diff --git a/services/web/frontend/js/features/ui/components/bootstrap-5/dropdown-menu.tsx b/services/web/frontend/js/features/ui/components/bootstrap-5/dropdown-menu.tsx index 83f6b44bff..aa35c158d9 100644 --- a/services/web/frontend/js/features/ui/components/bootstrap-5/dropdown-menu.tsx +++ b/services/web/frontend/js/features/ui/components/bootstrap-5/dropdown-menu.tsx @@ -78,19 +78,23 @@ function DropdownItem( return ( {leadingIconComponent} - {children} - {trailingIconComponent} - {description && ( - {description} - )} +
+ {children} + {trailingIconComponent} + {description && ( + {description} + )} +
) } diff --git a/services/web/frontend/stories/ui/dropdown-menu.stories.tsx b/services/web/frontend/stories/ui/dropdown-menu.stories.tsx index 3426299cc3..fcd0cf9855 100644 --- a/services/web/frontend/stories/ui/dropdown-menu.stories.tsx +++ b/services/web/frontend/stories/ui/dropdown-menu.stories.tsx @@ -138,7 +138,7 @@ export const Description = (args: Args) => { ) } -export const Icon = (args: Args) => { +export const LeadingIcon = (args: Args) => { return ( { eventKey="5" href="#/action-5" leadingIcon="align_space_even" + description="Some description" + > + With a description + + Small icon @@ -183,6 +191,33 @@ export const Icon = (args: Args) => { ) } +export const TrailingIcon = (args: Args) => { + return ( + + + Tick + + + With a description + + + With a leading icon + + + ) +} + const meta: Meta = { title: 'Shared / Components / Bootstrap 5 / DropdownMenu', component: DropdownMenu, diff --git a/services/web/frontend/stylesheets/bootstrap-5/components/dropdown-menu.scss b/services/web/frontend/stylesheets/bootstrap-5/components/dropdown-menu.scss index ac36298510..b603c0093e 100644 --- a/services/web/frontend/stylesheets/bootstrap-5/components/dropdown-menu.scss +++ b/services/web/frontend/stylesheets/bootstrap-5/components/dropdown-menu.scss @@ -113,7 +113,9 @@ .dropdown-item-description-container { grid-auto-flow: row; - min-height: 60px; + min-height: 44px; + display: grid; + place-content: center start; } .dropdown-item-trailing-icon { @@ -124,6 +126,8 @@ } .dropdown-item-leading-icon { + display: flex; + align-items: center; padding-right: var(--spacing-04); &.spinner {