-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Align menu item long content with icon slots (#33102)
- Loading branch information
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
apps/vr-tests-react-components/src/stories/Menu/MenuItemSelectableWIthLongText.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import * as React from 'react'; | ||
import type { Meta } from '@storybook/react'; | ||
import { Menu, MenuTrigger, MenuPopover, MenuList, MenuItemCheckbox, MenuItem } from '@fluentui/react-menu'; | ||
import { StoryWright } from 'storywright'; | ||
import { CutRegular, CutFilled, bundleIcon } from '@fluentui/react-icons'; | ||
|
||
const CutIcon = bundleIcon(CutFilled, CutRegular); | ||
|
||
export default { | ||
title: 'Menu Converged - selection', | ||
decorators: [story => <StoryWright>{story()}</StoryWright>], | ||
} satisfies Meta<typeof Menu>; | ||
|
||
export const SelectableWithLongText = () => ( | ||
<Menu hasIcons hasCheckmarks open> | ||
<MenuTrigger disableButtonEnhancement> | ||
<button>Toggle menu</button> | ||
</MenuTrigger> | ||
<MenuPopover> | ||
<MenuList> | ||
<MenuItemCheckbox icon={<CutIcon />} name="edit" value="cut"> | ||
Checkbox item | ||
</MenuItemCheckbox> | ||
<MenuItem>Menu item with really long text, this is really really long text</MenuItem> | ||
<MenuItem>Menu item</MenuItem> | ||
</MenuList> | ||
</MenuPopover> | ||
</Menu> | ||
); | ||
|
||
SelectableWithLongText.storyName = 'selectable with long text'; |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-menu-738a350f-94f7-49f4-a55a-6f5f807cf659.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "fix: Align menu item long content with icon slots", | ||
"packageName": "@fluentui/react-menu", | ||
"email": "lingfangao@hotmail.com", | ||
"dependentChangeType": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters