Skip to content

Commit

Permalink
feat(MenuButton): 14063 Allow passing className for MenuPopover
Browse files Browse the repository at this point in the history
  • Loading branch information
albaranau committed Sep 9, 2024
1 parent bc84192 commit 7f31539
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/ui-kit/src/MenuButton/components/MenuList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ import type { ForwardRefComponent } from '../../../utils/component-helpers/polym
export interface MenuListProps {
portal?: boolean;
children: React.ReactNode;
className?: string;
classes?: {
popover?: string;
};
}

export const MenuList = React.forwardRef(({ portal = true, className, ...props }, forwardedRef) => {
export const MenuList = React.forwardRef(({ portal = true, className, classes, ...props }, forwardedRef) => {
const dynamicClasses = cn(
{
[style.menuList]: true,
Expand All @@ -22,7 +26,7 @@ export const MenuList = React.forwardRef(({ portal = true, className, ...props }
);

return (
<MenuPopover portal={portal}>
<MenuPopover className={classes?.popover} portal={portal}>
<MenuItems {...props} ref={forwardedRef} className={dynamicClasses} />
</MenuPopover>
);
Expand Down

0 comments on commit 7f31539

Please sign in to comment.