[feature] sticky notes (#148)
* Refactor toolbar * Adds containerRef prop * Fix arrows for groups * Adds auto focus * Notes on blurring * Upgrades to match main * Loose ends around sticky notes * Fixes user select * Passing tests * Update sticky.tsx
This commit is contained in:
parent
1408ac2cbe
commit
e1c307fd71
47 changed files with 918 additions and 568 deletions
|
@ -20,6 +20,10 @@ export interface RendererProps<T extends TLShape, E extends Element = any, M = a
|
|||
* (optional) A unique id to be applied to the renderer element, used to scope styles.
|
||||
*/
|
||||
id?: string
|
||||
/**
|
||||
* (optional) A ref for the renderer's container element, used for scoping event handlers.
|
||||
*/
|
||||
containerRef?: React.RefObject<HTMLElement>
|
||||
/**
|
||||
* An object containing instances of your shape classes.
|
||||
*/
|
||||
|
@ -93,6 +97,7 @@ export function Renderer<T extends TLShape, E extends Element, M extends Record<
|
|||
userId,
|
||||
theme,
|
||||
meta,
|
||||
containerRef,
|
||||
hideHandles = false,
|
||||
hideIndicators = false,
|
||||
hideBounds = false,
|
||||
|
@ -132,6 +137,7 @@ export function Renderer<T extends TLShape, E extends Element, M extends Record<
|
|||
hideBounds={hideBounds}
|
||||
hideIndicators={hideIndicators}
|
||||
hideHandles={hideHandles}
|
||||
externalContainerRef={containerRef}
|
||||
meta={meta}
|
||||
/>
|
||||
</TLContext.Provider>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue