Tldraw/packages/editor/src/lib/editor/tools/TextShapeTool/TextShapeTool.ts

15 wiersze
404 B
TypeScript

import { TLStyleType } from '@tldraw/tlschema'
import { StateNode } from '../StateNode'
import { Idle } from './children/Idle'
import { Pointing } from './children/Pointing'
export class TextShapeTool extends StateNode {
static override id = 'text'
static initial = 'idle'
static children = () => [Idle, Pointing]
styles = ['color', 'font', 'align', 'size'] as TLStyleType[]
shapeType = 'text'
}