Primitives
Editor.AddShapeButton
Toolbar button that inserts a new shape section (rect, ellipse, or line).
Toolbar button that inserts a new shape section (rect, ellipse, or line).
Usage
import { Editor } from '@docmosaic/react';
<Editor.Root>
<Editor.AddShapeButton />
</Editor.Root>;API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| shape | enum | - | Which shape primitive to insert. Defaults to |
| label | string | undefined | - | Override the displayed label. Defaults to "Add Rectangle/Circle/Line". |
| iconOnly | boolean | undefined | - | Render a compact icon-only square button with an accessible label. |
| variant | "default" | "cream" | "sage" | "orange" | "caramel" | "white" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined | - | Override the icon-only button variant. Defaults to |
| className | string | undefined | - | Extra classes merged onto the icon-only button. |
Related
- Root - the orchestrator