@@ -31,6 +31,7 @@ export function MenuItem(props: React.PropsWithChildren<MenuItemProps>): JSX.Ele
3131 } ) ;
3232 const telemetry = useTelemetry ( ) ;
3333 const isDrilldown = type === MenuItemType . DrillDown ;
34+ const isSeparator = type === MenuItemType . Separator ;
3435 const isNested = type === MenuItemType . Group ;
3536 const hasChevron = isNested && ! isDrilldown ;
3637 const isOperation = type === MenuItemType . Operation ;
@@ -108,6 +109,7 @@ export function MenuItem(props: React.PropsWithChildren<MenuItemProps>): JSX.Ele
108109 deprecated = { item . deprecated }
109110 depth = { depth }
110111 withChevron = { hasChevron }
112+ isSeparator = { isSeparator }
111113 onClick = { handleOnClick }
112114 ref = { labelRef }
113115 role = { item . link ? 'none' : 'link' }
@@ -257,6 +259,7 @@ const MenuItemLabelWrapper = styled.li<{
257259 depth ?: number ;
258260 withChevron ?: boolean ;
259261 deprecated ?: boolean ;
262+ isSeparator ?: boolean ;
260263} > `
261264 display: flex;
262265 position: relative;
@@ -270,10 +273,11 @@ const MenuItemLabelWrapper = styled.li<{
270273 padding: var(--menu-item-label-padding);
271274 gap: var(--menu-item-label-gap);
272275
273- padding-left: ${ ( { withChevron, depth } ) =>
276+ padding-left: ${ ( { withChevron, depth, isSeparator } ) =>
274277 `calc(
275278 var(--menu-item-padding-horizontal) +
276279 ${ ! withChevron ? 'var(--menu-item-label-chevron-offset)' : '0px' } +
280+ ${ isSeparator ? 'var(--menu-item-separator-offest)' : '0px' } +
277281 ${ depth ? 'var(--menu-item-nested-offset) * ' + depth : '0px' }
278282 )` } ;
279283
0 commit comments