Skip to content

Commit

Permalink
fix: fixed code style for popover menu button
Browse files Browse the repository at this point in the history
  • Loading branch information
coderwelsch committed Aug 5, 2024
1 parent 6a38c2d commit 3c06792
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/popover-menu/popover-menu-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ export interface NavigationPopoverButtonProps extends ButtonProps {
onClick?: () => void;
}

export const PopoverMenuButton = ({ onClick, ...restProps }: NavigationPopoverButtonProps) => {
export const PopoverMenuButton = ({
onClick,
children,
...restProps
}: NavigationPopoverButtonProps) => {
const {
popoverButton: { setReferenceElement },
} = usePopoverMenuContext();

return (
<HeadlessUiPopoverButton ref={(el) => el && setReferenceElement(el)} onClick={onClick}>
<Button {...restProps} />
<Button {...restProps}>{children}</Button>
</HeadlessUiPopoverButton>
);
};

0 comments on commit 3c06792

Please sign in to comment.