You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
| 12345678910111213141516 |
- import { TLDraw } from '@tldraw/tldraw'
- import React from 'react'
-
- interface EditorProps {
- id?: string
- }
-
- export default function Editor({ id = 'home' }: EditorProps) {
- const handleMount = React.useCallback((tlstate) => {
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
- window.tlstate = tlstate
- }, [])
-
- return <TLDraw id={id} onMount={handleMount} />
- }
|