UNPKG

shelving

Version:

Toolkit for using data in JavaScript.

18 lines (17 loc) 854 B
import type { ReactElement } from "react"; import type { ChoiceOptions } from "../../schema/ChoiceSchema.js"; import type { ValueInputProps } from "./Input.js"; export interface ChoiceRadioInputsProps<T extends string> extends ValueInputProps<T> { /** Options for the radios. */ options: ChoiceOptions<T>; /** Wrap the radios onto multiple rows if needed. */ wrap?: boolean; /** Display the radios in a column rather than a row. */ column?: boolean; } /** * Output a list of `<RadioInput>` elements for each item in a set of `ChoiceOptions` in `{ key: title }` format. * - This is the same type a `ChoiceSchema` uses for its `.options` field. * - A `placeholder` option is shown at the bottom if `required=false`. */ export declare function ChoiceRadioInputs<T extends string>(props: ChoiceRadioInputsProps<T>): ReactElement;