From 599f7e1efce976b6780b25924445cae56dae8f61 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Mon, 23 Sep 2024 15:53:20 +0100 Subject: [PATCH] Handle standalone items use-case --- .../components/src/dropdown-menu/stories/index.story.tsx | 3 +++ packages/components/src/dropdown/stories/index.story.tsx | 1 + packages/components/src/dropdown/style.scss | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/packages/components/src/dropdown-menu/stories/index.story.tsx b/packages/components/src/dropdown-menu/stories/index.story.tsx index b6bc11ddec9abf..dd4907bd0b96b1 100644 --- a/packages/components/src/dropdown-menu/stories/index.story.tsx +++ b/packages/components/src/dropdown-menu/stories/index.story.tsx @@ -96,6 +96,9 @@ export const WithChildren: StoryObj< typeof DropdownMenu > = { icon: more, children: ( { onClose } ) => ( <> + + Standalone Item + Move Up diff --git a/packages/components/src/dropdown/stories/index.story.tsx b/packages/components/src/dropdown/stories/index.story.tsx index c6fe5014ffdc2a..0f07664787cc33 100644 --- a/packages/components/src/dropdown/stories/index.story.tsx +++ b/packages/components/src/dropdown/stories/index.story.tsx @@ -99,6 +99,7 @@ export const WithMenuItems: StoryObj< typeof Dropdown > = { ...Default.args, renderContent: () => ( <> + Standalone Item Item 1 Item 2 diff --git a/packages/components/src/dropdown/style.scss b/packages/components/src/dropdown/style.scss index 280a8e444714a6..d7ae7963f7ed8c 100644 --- a/packages/components/src/dropdown/style.scss +++ b/packages/components/src/dropdown/style.scss @@ -8,6 +8,12 @@ &:has(.components-menu-group) { padding: 0; + + .components-dropdown-menu__menu > .components-menu-item__button, + > .components-menu-item__button { + margin: $grid-unit-10; + width: auto; + } } }