Fixes #2246 Sublibraries example (ExplodedExample.tsx) (#2247)

Describe what your pull request does. If appropriate, add GIFs or images
showing the before and after.

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [x] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Test Plan

1. Run the examples
2. [http://localhost:5420/exploded](http://localhost:5420/exploded)
Observe that shapes work and can be resized as expected

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Fixed Sublibraries (Exploded) example

Co-authored-by: Gary Saunders <gary.saunders@sportsengine.com>
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
pull/2259/head
Gary Saunders 2023-11-25 09:18:31 -05:00 zatwierdzone przez GitHub
rodzic 932ec4cdd6
commit 699502d8c4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 15 dodań i 0 usunięć

Wyświetl plik

@ -2,6 +2,11 @@ import {
Canvas,
ContextMenu,
TldrawEditor,
TldrawHandles,
TldrawHoveredShapeIndicator,
TldrawScribble,
TldrawSelectionBackground,
TldrawSelectionForeground,
TldrawUi,
defaultShapeTools,
defaultShapeUtils,
@ -9,6 +14,15 @@ import {
} from '@tldraw/tldraw'
import '@tldraw/tldraw/tldraw.css'
const defaultComponents = {
Scribble: TldrawScribble,
CollaboratorScribble: TldrawScribble,
SelectionForeground: TldrawSelectionForeground,
SelectionBackground: TldrawSelectionBackground,
Handles: TldrawHandles,
HoveredShapeIndicator: TldrawHoveredShapeIndicator,
}
export default function ExplodedExample() {
return (
<div className="tldraw__editor">
@ -16,6 +30,7 @@ export default function ExplodedExample() {
initialState="select"
shapeUtils={defaultShapeUtils}
tools={[...defaultTools, ...defaultShapeTools]}
components={defaultComponents}
persistenceKey="exploded-example"
>
<TldrawUi>