Mixins / foldkit-mixins-ui
InputView
type · packages/mixins-ui/src/input.ts:120
type InputView<Message> = InputCommon<Message> &
(
| InputDrawn
| {
readonly draw: (
resolved: ResolvedInput<Message>,
h: HtmlBuilder<Message>,
) => Html
readonly described?: boolean | undefined
readonly label?: undefined
readonly description?: undefined
readonly labelAside?: undefined
readonly start?: undefined
readonly end?: undefined
}
)An input in one call: its value and Messages, a style for its slots, and
the rest of @foldkit/ui's own config. Given a label, it draws the field
itself: the label (with labelAside beside it), the control with start
and end around it inside one box, and the description under it. Given a
draw, it places the resolved input, label and description bundles
(and root, header, labelAside, group, start and end) as the
application wants, and toView stays for one drawn as something else.