Skip to content

Commit

Permalink
fix: Add overflowWrap on MenuItem (#3094)
Browse files Browse the repository at this point in the history
Fixes: #3091

[category:Components]

Co-authored-by: manuel.carrera <manuel.carrera@workday.com>
  • Loading branch information
mannycarrera4 and manuel.carrera authored Jan 7, 2025
1 parent 792c710 commit 786eb95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/react/menu/lib/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const menuItemStencil = createStencil({
transition: 'background-color 80ms, color 80ms',
backgroundColor: 'inherit',
minHeight: system.space.x10,
overflowWrap: 'anywhere',
// We want the icon colors to be the same as the text color
[systemIconStencil.vars.color]: 'currentcolor',

Expand Down
1 change: 1 addition & 0 deletions modules/react/menu/stories/testingVisual.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const AllStatesMenuItem = () => (
<Menu.Item className="focus hover">Focused & Hovered Item</Menu.Item>
<Menu.Item aria-disabled={true}>Disabled Item</Menu.Item>
<Menu.Item>Wrapped Text Item Wrapped Text Item Wrapped Text Item</Menu.Item>
<Menu.Item>Superlonglinethatshouldbreakonitsownwithouthavingtodoanythingspecial</Menu.Item>
<Menu.Divider />
<Menu.Item>Menu item between dividers</Menu.Item>
<Menu.Divider />
Expand Down

0 comments on commit 786eb95

Please sign in to comment.