From 65bebb8326a2ee040de2b30e29228679eb408bbe Mon Sep 17 00:00:00 2001 From: Hossein Mehrabi Date: Mon, 23 Oct 2023 10:26:04 +0330 Subject: [PATCH] feat: add support for custom menu properties in Dropdown component --- packages/lsd-react/src/components/Dropdown/Dropdown.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/lsd-react/src/components/Dropdown/Dropdown.tsx b/packages/lsd-react/src/components/Dropdown/Dropdown.tsx index 63d42d0..51fc270 100644 --- a/packages/lsd-react/src/components/Dropdown/Dropdown.tsx +++ b/packages/lsd-react/src/components/Dropdown/Dropdown.tsx @@ -7,7 +7,7 @@ import { } from '../../utils/useCommonProps' import { SelectOption, useSelect } from '../../utils/useSelect' import { DropdownItem } from '../DropdownItem' -import { DropdownMenu } from '../DropdownMenu' +import { DropdownMenu, DropdownMenuProps } from '../DropdownMenu' import { ChevronDownIcon, ChevronUpIcon, ErrorIcon } from '../Icons' import { Portal } from '../PortalProvider/Portal' import { Typography } from '../Typography' @@ -34,6 +34,8 @@ export type DropdownProps = CommonProps & variant?: 'outlined' | 'underlined' isOpen?: boolean onToggle?: (open: boolean) => void + + menuProps?: Partial } export const Dropdown: React.FC & { @@ -52,6 +54,7 @@ export const Dropdown: React.FC & { variant = 'outlined', isOpen, onToggle, + menuProps = {}, ...props }) => { const commonProps = useCommonProps(props) @@ -168,6 +171,7 @@ export const Dropdown: React.FC & { onClose={() => handleToggle(false)} size={size} genericFontFamily={props.genericFontFamily} + {...menuProps} > {options.map((opt) => (