welcome-ui
Version:
Customizable design system with react, typescript, tailwindcss and ariakit.
18 lines (17 loc) • 571 B
TypeScript
import { HTMLAttributes } from 'react';
import { FieldGroupOptions } from '../FieldGroup/types';
export type RadioGroupOption = {
hint?: string;
label: number | string;
value: number | string;
};
export interface RadioGroupOptions {
dataTestId?: string;
disabled?: boolean;
name: string;
onChange?: (value: RadioGroupOption['value']) => void;
options: RadioGroupOption[];
renderOption?: React.ElementType;
value?: string;
}
export type RadioGroupProps = FieldGroupOptions & HTMLAttributes<HTMLFieldSetElement> & RadioGroupOptions;