new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Storybook · API · all subjects

argtypes & controls

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

control property type and default

The control property specifies behavior of the controls panel for an arg. Type is ControlType | {type, accept, labels, max, min, presetColors, step} | false. Default: (1) 'select' if options are specified, (2) else inferred from type, (3) else 'object'. Specifying false prevents control rendering.

control.type property types and defaults

control.type specifies the type of control used to change arg value in the controls panel. Type: ControlType | null. Default: Inferred; 'select' if options are specified; falling back to 'object'. Available ControlTypes by data type: array=['object'], boolean=['boolean'], enum=['check', 'inline-check', 'radio', 'inline-radio', 'select', 'multi-select'], number=['number', 'range'], object=['file', 'object'], string=['color', 'date', 'text'].

Boolean control type

The 'boolean' control type provides a toggle for switching between possible states. Usage: { control: 'boolean' }.

control.accept property for file type

When control type is 'file', the accept property specifies file types that are accepted as a string of comma-separated MIME types.

control.labels property

control.labels maps options to labels as {[option: string]: string}. Labels does not have to be exhaustive; if an option is not in the object's keys, it is used verbatim.

control.max and control.min properties

control.max and control.min are numbers that set the maximum and minimum allowed values when control type is 'number' or 'range'.

control.presetColors property

control.presetColors is a string array that defines the set of colors available in addition to the general color picker when control type is 'color'. Values should be valid CSS color values.

control.step property

control.step is a number that sets the granularity allowed when incrementing/decrementing the value when control type is 'number' or 'range'.

date control UNIX timestamp conversion known limitation

The 'date' control type converts the date into a UNIX timestamp when the value changes. This is a known limitation that will be fixed in a future release. If you need to represent the actual date, you need to update the story's implementation and convert the value into a date object.

Give your agent this brain

argtypes & controls — Storybook · API