Skip to content

Commit

Permalink
fix(Popup): pick only used props from PopperProps
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeraS committed Feb 12, 2024
1 parent 8eacc82 commit ccdba8a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/Popup/Popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ import './Popup.scss';
export type PopupPlacement = PopperPlacement;
export type PopupAnchorRef = PopperAnchorRef;

export interface PopupProps extends DOMProps, LayerExtendableProps, PopperProps, QAProps {
export interface PopupProps
extends DOMProps,
LayerExtendableProps,
Pick<PopperProps, 'anchorRef' | 'modifiers' | 'placement' | 'offset' | 'strategy'>,
QAProps {
open?: boolean;
children?: React.ReactNode;
keepMounted?: boolean;
Expand Down Expand Up @@ -145,7 +149,7 @@ export function Popup({
aria-label={ariaLabel}
aria-labelledby={ariaLabelledBy}
>
<FocusTrap enabled={focusTrap && open} disableAutoFocus={!autoFocus}>
<FocusTrap enabled={focusTrap && open} autoFocus={autoFocus}>
{/* FIXME The onClick event handler is deprecated and should be removed */}
{/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}
<div
Expand Down

0 comments on commit ccdba8a

Please sign in to comment.