diff --git a/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.module.scss b/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.module.scss index 23d0e00d9..9fd939fd7 100644 --- a/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.module.scss +++ b/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.module.scss @@ -1,4 +1,7 @@ .navigationGroup { + &:not(.collapsable) ul { + padding: var(--accordion--content-padding); + } &:not(:last-child) { margin-bottom: var(--menu--group-to-group-spacing); } @@ -6,5 +9,6 @@ .label { display: block; margin-block: var(--menu--label-to-group-spacing); + padding-inline-start: var(--accordion--header-padding-x); } } diff --git a/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.tsx b/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.tsx index 2bb6657a0..5d880ca06 100644 --- a/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.tsx +++ b/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.tsx @@ -16,7 +16,11 @@ export interface NavigationGroupProps export const NavigationGroup: FC = (props) => { const { children, className, collapsable, ...rest } = props; - const rootClassName = clsx(styles.navigationGroup, className); + const rootClassName = clsx( + styles.navigationGroup, + collapsable && styles.collapsable, + className, + ); const generatedId = useId(); diff --git a/packages/components/src/components/Navigation/stories/Default.stories.tsx b/packages/components/src/components/Navigation/stories/Default.stories.tsx index 5fb4cdbb4..cc31ee254 100644 --- a/packages/components/src/components/Navigation/stories/Default.stories.tsx +++ b/packages/components/src/components/Navigation/stories/Default.stories.tsx @@ -119,3 +119,30 @@ export const WithCollapsableGroups: Story = { ), }; +export const MixedGroups: Story = { + render: (props) => ( + + + + Dashboard + + Performance + + + + + + Apps + Databases + Domains + + + + + Testsite + Testsite + Testsite + + + ), +}; diff --git a/packages/design-tokens/src/actions/menu-item.yml b/packages/design-tokens/src/actions/menu-item.yml index 16ec40868..d2582b5aa 100644 --- a/packages/design-tokens/src/actions/menu-item.yml +++ b/packages/design-tokens/src/actions/menu-item.yml @@ -4,7 +4,7 @@ menu: group-to-group-spacing: value: "{size-px.m}" label-to-group-spacing: - value: "{size-px.s}" + value: "{size-px.xs}" separator-to-item-spacing: value: "{size-px.s}"