Skip to content

Commit

Permalink
feat(Popover): add popper modifiers to popover props (#993)
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisVershkov authored Sep 7, 2023
1 parent d51039b commit fdce64a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/Popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const Popover = React.forwardRef<PopoverInstanceProps, PopoverProps & QAP
focusTrap,
autoFocus,
restoreFocusRef,
modifiers,
},
ref,
) {
Expand Down Expand Up @@ -129,6 +130,7 @@ export const Popover = React.forwardRef<PopoverInstanceProps, PopoverProps & QAP
autoFocus={autoFocus}
restoreFocus={true}
restoreFocusRef={restoreFocusRef || controlRef}
modifiers={modifiers}
>
<React.Fragment>
{title && <h3 className={cnPopover('tooltip-title')}>{title}</h3>}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Popover/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export type PopoverDefaultProps = {
size: 's' | 'l';
};

export type PopoverProps = Pick<PopupProps, 'anchorRef' | 'strategy' | 'placement'> &
export type PopoverProps = Pick<PopupProps, 'anchorRef' | 'strategy' | 'placement' | 'modifiers'> &
PopoverExternalProps &
PopoverBehaviorProps &
Partial<PopoverDefaultProps>;
Expand Down

0 comments on commit fdce64a

Please sign in to comment.