goobs-frontend
Version:
A comprehensive React-based libary for building modern web applications
37 lines • 1.17 kB
TypeScript
import { default as React } from 'react';
import { RadioGroupStyles } from '../../theme/radiogroup';
/**
* Interface representing a single radio option
*/
export interface RadioOption {
label: string;
color?: string;
}
/**
* Interface for the props of the RadioGroup component
*/
export interface RadioGroupProps {
/** The group label */
label?: string;
/** Array of radio options */
options: RadioOption[];
/** Default selected value */
defaultValue?: string;
/** Name for the radio group */
name: string;
/** Label text to display */
labelText?: string;
/** Change handler */
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
/** Custom styles to apply using the theme system */
styles?: RadioGroupStyles;
}
/**
* RadioGroup component renders a group of radio buttons with customizable options.
* It allows selecting a single value from a list of options.
* @param props The props for the RadioGroup component.
* @returns The rendered RadioGroup component.
*/
declare const RadioGroup: React.FC<RadioGroupProps>;
export default RadioGroup;
//# sourceMappingURL=index.d.ts.map