import { default as React } from 'react'; import { RadioKind } from '../Radio'; export type RadioButtonsLayouts = "row" | "row-start"; export type RadioButtonsKind = RadioKind | RadioButtonsLayouts; export interface RadioButtonsProps { /** Map of label strings to input values * * TODO: restore this type when we can do it in a non-breaking way * ``` * type OptionType = { * value: string; * details?: string; * } * | string; * ``` * */ options?: object; /** name of radiogroup */ name: string; /** initially selected option by input value (uncontrolled) */ initialValue?: unknown; /** * selected option by input value (fully controlled) * When passing a `value` prop, you must use the `onChange` * handler to update the `value` */ value?: string; /** change callback invoked with input value */ onChange?: (e: React.ChangeEvent) => void; /** * `normal` - display input and label normally * * `card` - display input and label as a toggleable card * * `input-card` - display toggleable card with a faux radio input * * `checkmark` - uses a checkmark icon instead of a faux radio */ kind?: RadioButtonsKind; /** * Error message. When passed, the `error` prop will * render the radio group in an error state. */ error?: string; /** * Always show details. When `true`, the details will * always be shown, regardless of if an radio button is selected. * When `false`, the details will only be shown when a radio * button is selected. Defaults to `false` */ alwaysShowDetails?: boolean; /** Optional value for `data-testid` attribute */ testId?: string; /** Supports arbitrary HTML attributes spread onto the root element */ [x: string]: unknown; } /** The Narmi RadioButtons component expects an "options" Prop, which is an object where the keys are the radiobutton labels and the values are the radiobutton values. An "initialvalue" Prop can be passed to set a default checked radiobutton. ``` options={{ "First Label": { value: "firstValue", details: "This is the explanation of the firstValue" }, "Second Label": { value: "secondValue", details: "This is the explanation of the secondValue" } } ``` The other options configuration without details would be: ``` options={{ "First Label": "firstValue", "Second Label": "secondValue" }} ``` */ declare const RadioButtons: ({ options, name, initialValue, value, kind, onChange, testId, error, alwaysShowDetails, ...containerProps }: RadioButtonsProps) => React.JSX.Element; export default RadioButtons; //# sourceMappingURL=index.d.ts.map