diff --git a/src/ActionList/Visuals.tsx b/src/ActionList/Visuals.tsx index 4a290b20f3e..43570d0cd04 100644 --- a/src/ActionList/Visuals.tsx +++ b/src/ActionList/Visuals.tsx @@ -9,6 +9,7 @@ type VisualProps = SxProp & React.HTMLAttributes export const LeadingVisualContainer: React.FC> = ({sx = {}, ...props}) => { return ( { @@ -370,7 +369,6 @@ export const UnderlineNav = forwardRef( ref={containerRef} id={disclosureWidgetId} sx={merge({display: isWidgetOpen ? 'block' : 'none'}, menuStyles)} - {...props} > {actions.map((action, index) => { const {children: actionElementChildren, ...actionElementProps} = action.props diff --git a/src/UnderlineNav2/UnderlineNav2.features.stories.tsx b/src/UnderlineNav2/UnderlineNav2.features.stories.tsx index d38796e3cdc..7c52532542a 100644 --- a/src/UnderlineNav2/UnderlineNav2.features.stories.tsx +++ b/src/UnderlineNav2/UnderlineNav2.features.stories.tsx @@ -76,11 +76,7 @@ const items: {navigation: string; icon: React.FC; counter?: number | export const OverflowTemplate = ({initialSelectedIndex = 1}: {initialSelectedIndex?: number}) => { const [selectedIndex, setSelectedIndex] = React.useState(initialSelectedIndex) return ( - + {items.map((item, index) => ( span': { + '& span[data-component="ActionList.LeadingVisual"]': { display: 'none', }, // To reset the style when the menu items are rendered as react router links