mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Merge 490c370c74
into debf2ad608
This commit is contained in:
commit
895e4a4b24
1 changed files with 24 additions and 0 deletions
|
@ -167,3 +167,27 @@ 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.Separator
|
||||||
|
|
||||||
|
To put a horizontal line between items, you can use `MainMenu.Separator`.
|
||||||
|
|
||||||
|
```jsx live
|
||||||
|
function App() {
|
||||||
|
return (
|
||||||
|
<div style={{ height: "500px" }}>
|
||||||
|
<Excalidraw>
|
||||||
|
<MainMenu>
|
||||||
|
<MainMenu.Item onSelect={() => window.alert("Item1")}>
|
||||||
|
Item1
|
||||||
|
</MainMenu.Item>
|
||||||
|
<MainMenu.Separator />
|
||||||
|
<MainMenu.Item onSelect={() => window.alert("Item2")}>
|
||||||
|
Item 2
|
||||||
|
</MainMenu.Item>
|
||||||
|
</MainMenu>
|
||||||
|
</Excalidraw>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue