One row of a generated form, whatever schema it came from.

interface FormControl {
    custom?: string;
    group?: string;
    key: string;
    kind: FormKind;
    label: string;
    max?: number;
    min?: number;
    options?: readonly { label: string; value: string }[];
    pair?: {
        down: { key: string; label: string };
        enabled?: { key: string };
        up: { key: string; label: string };
    };
    step?: number;
    tooltip?: string;
}

Properties

custom?: string

custom only: what the dialog renders in the control column.

group?: string

Sub-heading the row sits under; consecutive rows with one group share a header.

key: string

The flat key onChange reports. A colorPair reports its halves' keys instead.

kind: FormKind
label: string
max?: number
min?: number
options?: readonly { label: string; value: string }[]

select only. Absent means free-form: the control becomes a text box.

pair?: {
    down: { key: string; label: string };
    enabled?: { key: string };
    up: { key: string; label: string };
}

colorPair only: the switch (optional) and the two swatches.

step?: number
tooltip?: string

Help text; rendered as a hover affordance beside the label.