Add documentation for the components prop (#1004)
* Add documentation for the components prop * Add documentation for `hideCursors`
This commit is contained in:
parent
c5bee7b1be
commit
84d78e4d56
1 changed files with 20 additions and 12 deletions
|
@ -90,18 +90,20 @@ To avoid unnecessary renders, be sure to pass "stable" values as props to the `R
|
||||||
|
|
||||||
In addition to these required props, the Renderer accents many other **optional** props.
|
In addition to these required props, the Renderer accents many other **optional** props.
|
||||||
|
|
||||||
| Property | Type | Description |
|
| Property | Type | Description |
|
||||||
| -------------------- | ----------------------------- | ----------------------------------------------------------------- |
|
| -------------------- | ----------------------------- | --------------------------------------------------------------------- |
|
||||||
| `containerRef` | `React.MutableRefObject` | A React ref for the container, where CSS variables will be added. |
|
| `containerRef` | `React.MutableRefObject` | A React ref for the container, where CSS variables will be added. |
|
||||||
| `theme` | `object` | An object with overrides for the Renderer's default colors. |
|
| `theme` | `object` | An object with overrides for the Renderer's default colors. |
|
||||||
| `hideBounds` | `boolean` | Do not show the bounding box for selected shapes. |
|
| `components` | `object` | An object with overrides for the Renderer's default React components. |
|
||||||
| `hideHandles` | `boolean` | Do not show handles for shapes with handles. |
|
| `hideBounds` | `boolean` | Do not show the bounding box for selected shapes. |
|
||||||
| `hideBindingHandles` | `boolean` | Do not show binding controls for selected shapes with bindings. |
|
| `hideHandles` | `boolean` | Do not show handles for shapes with handles. |
|
||||||
| `hideResizeHandles` | `boolean` | Do not show resize handles for selected shapes. |
|
| `hideBindingHandles` | `boolean` | Do not show binding controls for selected shapes with bindings. |
|
||||||
| `hideRotateHandles` | `boolean` | Do not show rotate handles for selected shapes. |
|
| `hideResizeHandles` | `boolean` | Do not show resize handles for selected shapes. |
|
||||||
| `snapLines` | [`TLSnapLine`](#tlsnapline)[] | An array of "snap" lines. |
|
| `hideRotateHandles` | `boolean` | Do not show rotate handles for selected shapes. |
|
||||||
| `users` | `object` | A table of [`TLUser`](#tluser)s. |
|
| `hideCursors` | `boolean` | Do not show multiplayer cursors. |
|
||||||
| `userId` | `object` | The current user's [`TLUser`](#tluser) id. |
|
| `snapLines` | [`TLSnapLine`](#tlsnapline)[] | An array of "snap" lines. |
|
||||||
|
| `users` | `object` | A table of [`TLUser`](#tluser)s. |
|
||||||
|
| `userId` | `object` | The current user's [`TLUser`](#tluser) id. |
|
||||||
|
|
||||||
The theme object accepts valid CSS colors for the following properties:
|
The theme object accepts valid CSS colors for the following properties:
|
||||||
|
|
||||||
|
@ -114,6 +116,12 @@ The theme object accepts valid CSS colors for the following properties:
|
||||||
| `selectFill` | The fill color of the selection bounds |
|
| `selectFill` | The fill color of the selection bounds |
|
||||||
| `selectStroke` | The stroke color of the selection bounds and handles |
|
| `selectStroke` | The stroke color of the selection bounds and handles |
|
||||||
|
|
||||||
|
The components object accepts React components for the following properties:
|
||||||
|
|
||||||
|
| Property | Description |
|
||||||
|
| -------- | --------------------------------- |
|
||||||
|
| `Cursor` | Multiplayer cursors on the canvas |
|
||||||
|
|
||||||
The Renderer also accepts many (optional) event callbacks.
|
The Renderer also accepts many (optional) event callbacks.
|
||||||
|
|
||||||
| Prop | Description |
|
| Prop | Description |
|
||||||
|
|
Loading…
Reference in a new issue