KnobOf.schema
property · packages/mixins/src/theme/knob.ts:31
readonly schema: Schema.Codec<Value>Mixins / foldkit-mixins/theme
interface · packages/mixins/src/theme/knob.ts:30
interface Knob<Value, Names extends string = string> {
readonly schema: Schema.Codec<Value>
write(value: Value): Readonly<Partial<Record<Names, string>>>
readonly unset: Variables<Names>
readonly default: Value
readonly title: string
readonly description: string
readonly control: Control
}A knob of Value writing the variables Names. write gives those a
value sets (a light-only value leaves the dark one out); unset gives
every one, as no theme set it.
KnobOf.schemaproperty · packages/mixins/src/theme/knob.ts:31
readonly schema: Schema.Codec<Value>KnobOf.writemethod · packages/mixins/src/theme/knob.ts:33
write(value: Value): Readonly<Partial<Record<Names, string>>>A method, so a knob of any value is a Knob<unknown>.
KnobOf.unsetproperty · packages/mixins/src/theme/knob.ts:34
readonly unset: Variables<Names>KnobOf.defaultproperty · packages/mixins/src/theme/knob.ts:36
readonly default: ValueThe value it stands at unset: a control's starting point.
KnobOf.titleproperty · packages/mixins/src/theme/knob.ts:38
readonly title: stringWhat the knob is called: a control's label.
KnobOf.descriptionproperty · packages/mixins/src/theme/knob.ts:40
readonly description: stringWhat the knob does, in a sentence: a control's tooltip.
KnobOf.controlproperty · packages/mixins/src/theme/knob.ts:41
readonly control: Control