Skip to content

Commit 3b28da7

Browse files
frankieyanclaude
andcommitted
fix(menu): render correct story in each docs Canvas
Co-Authored-By: Claude <noreply@anthropic.com>
1 parent a057f97 commit 3b28da7

1 file changed

Lines changed: 8 additions & 22 deletions

File tree

src/menu/menu.mdx

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Meta, Story, Canvas, Controls, Description } from '@storybook/addon-docs/blocks'
1+
import { Meta, Canvas, Controls, Description } from '@storybook/addon-docs/blocks'
22
import KeyboardShortcut from '../components/keyboard-shortcut'
33
import { Button, IconButton } from '../button'
44
import { Inline } from '../inline'
@@ -15,44 +15,34 @@ import * as MenuStories from './menu.stories'
1515
A set of components that provide the means to construct a menu that can be triggered
1616
via an element or as a context menu.
1717

18-
<Canvas>
19-
<Story of={MenuStories.SimpleMenuStory} />
20-
</Canvas>
18+
<Canvas of={MenuStories.SimpleMenuStory} />
2119

2220
### `tooltip`
2321

2422
The `tooltip` prop allows a tooltip to be shown over the menu button.
2523

26-
<Canvas>
27-
<Story of={MenuStories.TooltipStory} />
28-
</Canvas>
24+
<Canvas of={MenuStories.TooltipStory} />
2925

3026
### `modal`
3127

3228
By default, interaction with elements below the menu is disallowed when the menu is open. This behaviour can
3329
be changed by passing `modal={false}` to `<MenuList>`
3430

35-
<Canvas>
36-
<Story of={MenuStories.OutsideInteractionStory} />
37-
</Canvas>
31+
<Canvas of={MenuStories.OutsideInteractionStory} />
3832

3933
### `<SubMenu>`
4034

4135
You may nest the `<SubMenu>` component within `<Menu>` to create submenus.
4236

4337
On smaller viewports where there isn't enough space to render the submenu on either side, it will be rendered under its parent menu item instead.
4438

45-
<Canvas>
46-
<Story of={MenuStories.SubMenuStory} />
47-
</Canvas>
39+
<Canvas of={MenuStories.SubMenuStory} />
4840

4941
### Link menu items
5042

5143
A `MenuItem` rendered as a link (via `render`) that has no icon is automatically styled like a text link. Link items that include an icon keep the default menu item styling.
5244

53-
<Canvas>
54-
<Story of={MenuStories.LinkMenuItemStory} />
55-
</Canvas>
45+
<Canvas of={MenuStories.LinkMenuItemStory} />
5646

5747
### `<ContextMenuTrigger>`
5848

@@ -61,15 +51,11 @@ for the menu.
6151

6252
In the demo below, right click on the Settings button, or click on the more button:
6353

64-
<Canvas>
65-
<Story of={MenuStories.ContextMenuTriggerStory} />
66-
</Canvas>
54+
<Canvas of={MenuStories.ContextMenuTriggerStory} />
6755

6856
### Extra Features
6957

7058
You may also use `<MenuGroup>` to group menu items, `disable` a menu item, or
7159
return `false` from `onSelect` to prevent the menu from closing when an item is selected.
7260

73-
<Canvas>
74-
<Story of={MenuStories.ExtraFeaturesStory} />
75-
</Canvas>
61+
<Canvas of={MenuStories.ExtraFeaturesStory} />

0 commit comments

Comments
 (0)