[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:
Steve Ruiz 2021-10-13 17:03:33 +01:00 committed by GitHub
parent 1408ac2cbe
commit e1c307fd71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 918 additions and 568 deletions

View file

@ -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>