@mocanvas/mocanvas · function

readStyle

declare function readStyle<T extends string>(props: unknown, key: string, style: EnumStyleProp<T>, fallback?: T): T

A style prop's value, validated against the style's own set of values.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.