This commit is contained in:
みけCAT 2025-04-13 18:42:43 +00:00 committed by GitHub
commit e73265c561
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -167,3 +167,27 @@ function App() {
| Prop | Type | Required | Default | Description |
| --- | --- | :-: | :-: | --- |
| `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>
);
}
```