diff --git a/.changeset/famous-maps-burn.md b/.changeset/famous-maps-burn.md new file mode 100644 index 00000000..793d6ae2 --- /dev/null +++ b/.changeset/famous-maps-burn.md @@ -0,0 +1,5 @@ +--- +"@status-im/components": patch +--- + +add `` diff --git a/packages/components/src/dropdown-menu/dropdown-menu.stories.tsx b/packages/components/src/dropdown-menu/dropdown-menu.stories.tsx index 407e8902..2d520fcc 100644 --- a/packages/components/src/dropdown-menu/dropdown-menu.stories.tsx +++ b/packages/components/src/dropdown-menu/dropdown-menu.stories.tsx @@ -20,8 +20,12 @@ import { DropdownMenu } from '.' import type { Meta, StoryObj } from '@storybook/react' -const meta: Meta = { +const meta: Meta<{ label: boolean; search: boolean }> = { title: 'Components/Dropdown Menu', + args: { + label: true, + search: true, + }, argTypes: {}, parameters: { design: { @@ -38,7 +42,9 @@ const meta: Meta = { Open - + {args.label && Label} + + {args.search && } } diff --git a/packages/components/src/dropdown-menu/dropdown-menu.tsx b/packages/components/src/dropdown-menu/dropdown-menu.tsx index 02838b30..07859111 100644 --- a/packages/components/src/dropdown-menu/dropdown-menu.tsx +++ b/packages/components/src/dropdown-menu/dropdown-menu.tsx @@ -74,6 +74,25 @@ export const Content = forwardRef< Content.displayName = DropdownMenu.Content.displayName +/** + * Label + */ + +export const Label = forwardRef< + React.ElementRef, + React.ComponentPropsWithoutRef +>((props, ref) => { + return ( + + ) +}) + +Label.displayName = DropdownMenu.Label.displayName + /** * Search */