Documentation navigation

Published API · 0.1.0-rc.1

foldkit-ui · checkboxGroup

Published foldkit-ui API declarations for checkboxGroup.

./checkboxGroup

@wsagency/wseffect-foldkit-ui · MIT · source · MIT license · WS-AGENCY-NOTICE · THIRD-PARTY-NOTICES

This entry point is published in @wsagency/wseffect-foldkit-ui@0.1.0-rc.1. Import it from the package subpath shown below; the signatures and documentation are read from the installed package declarations.

import * as Wseffect from '@wsagency/wseffect-foldkit-ui/checkboxGroup'

Exported declarations

Option

export type Option<Value extends string> = Readonly<{
    value: Value;
    label: Html;
    isDisabled?: boolean;
}>;

Props

export type Props<Value extends string, Message> = Readonly<{
    id: string;
    label?: Html;
    ariaLabel?: string;
    options: ReadonlyArray<Option<Value>>;
    selected: ReadonlySet<Value>;
    isDisabled?: boolean;
    toggleMessage: (value: Value, isChecked: boolean) => Message;
    toView: (input: Readonly<{
        rootAttributes: ReadonlyArray<ChildAttribute>;
        labelAttributes: ReadonlyArray<ChildAttribute>;
        options: ReadonlyArray<Readonly<{
            option: Option<Value>;
            checkbox: Checkbox.CheckboxAttributes<Message>;
        }>>;
    }>) => Html;
}>;

view

view: <Value extends string, Message>(props: Props<Value, Message>, h: HtmlBuilder<Message>) => Html