UNPKG

@octopusdeploy/design-system-components

Version:
44 lines (43 loc) 1.46 kB
import type * as React from "react"; export interface RadioInputProps { /** * The unique id of the radio input to associate the input with label and description. */ id: string; /** * The name of the radio group. * Radios that share a name behave as a single keyboard-navigable group in the browser. */ name: string; /** * The value submitted when this radio is selected. */ value: string; /** * Whether this radio is the currently selected option in its group. */ checked: boolean; /** * Called when the radio is selected. */ onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; /** * Disables the radio input. */ disabled?: boolean; /** * Focuses the radio input on mount. */ autoFocus?: boolean; } /** * Internal radio input primitive. Split out from RadioButtonNew so other * design-system components (e.g. selectable cards) can build on the styled * radio input directly. * * This component is Intentionally not exported from the design system. * Consumers outside the design system should use RadioButtonNew (or other wrappers), * so that radios are never rendered without a proper label association. */ export declare function RadioInput({ id, name, value, checked, onChange, disabled, autoFocus }: RadioInputProps): import("react/jsx-runtime").JSX.Element; export declare const radioButtonSize = "1.25rem";