mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Removed MainMenu.Sub docs.
This commit is contained in:
parent
bf0b2965e6
commit
5b11660cc0
1 changed files with 0 additions and 32 deletions
|
@ -167,35 +167,3 @@ function App() {
|
||||||
| Prop | Type | Required | Default | Description |
|
| Prop | Type | Required | Default | Description |
|
||||||
| --- | --- | :-: | :-: | --- |
|
| --- | --- | :-: | :-: | --- |
|
||||||
| `children ` | `React.ReactNode` | Yes | - | The content of the `Menu Group` |
|
| `children ` | `React.ReactNode` | Yes | - | The content of the `Menu Group` |
|
||||||
|
|
||||||
### MainMenu.Sub
|
|
||||||
|
|
||||||
The MainMenu component now supports submenus. To render a submenu, you can use `MainMenu.Sub`, `MainMenu.Sub.Trigger`, `MainMenu.Sub.Content` and `MainMenu.Sub.Item`. Note that `MainMenu.Sub.Trigger` and `MainMenu.Sub.Content` must be direct children of `MainMenu.Sub`.
|
|
||||||
|
|
||||||
```jsx live
|
|
||||||
function App() {
|
|
||||||
return (
|
|
||||||
<div style={{ height: "500px" }}>
|
|
||||||
<Excalidraw>
|
|
||||||
<MainMenu>
|
|
||||||
<MainMenu.Sub>
|
|
||||||
<MainMenu.Sub.Trigger>Submenu</MainMenu.Sub.Trigger>
|
|
||||||
<MainMenu.Sub.Content>
|
|
||||||
<MainMenu.Sub.Item
|
|
||||||
onSelect={() => window.alert("Submenu item 1")}
|
|
||||||
>
|
|
||||||
Submenu item 1
|
|
||||||
</MainMenu.Sub.Item>
|
|
||||||
<MainMenu.Sub.Item
|
|
||||||
onSelect={() => window.alert("Submenu item 2")}
|
|
||||||
>
|
|
||||||
Submenu item 2
|
|
||||||
</MainMenu.Sub.Item>
|
|
||||||
</MainMenu.Sub.Content>
|
|
||||||
</MainMenu.Sub>
|
|
||||||
</MainMenu>
|
|
||||||
</Excalidraw>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue