@mocanvas/editor · class
declare class EnumStyleProp<T extends string> extends StyleProp<T>This one ships without a description. The signature above is read from the package, and the guides cover the area it belongs to.
Methods · 1
constructor(id: string, defaultValue: T, values: readonly T[])Properties · 1
readonly values: readonly T[]The accepted values — this style prop's OWN array, copied from the caller's.
registerColorsFromThemes extends this list in place (the validator closes
over the same array, so replacing it would leave the validator behind). The
copy is what keeps that in-place edit from reaching back into the tuple the
caller passed in: DefaultColorStyle is built from the exported
DEFAULT_COLORS, and sharing the array made registering an app's palette
silently rewrite DEFAULT_COLORS for everyone importing it.
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.