import { UseRadioProps } from '@chakra-ui/react'; import React, { MouseEventHandler } from 'react'; import { CheckboxType } from '../Checkbox/types'; import { IFormControlContext } from '../FormControl/types'; export interface IRadio extends UseRadioProps { /** * label for radio */ label: string | React.ReactNode; /** * controlled checked state */ checked?: boolean; /** * value for radio */ value: string | number; /** * onClick handler */ onClick?: MouseEventHandler; /** * styling option */ type?: CheckboxType; id?: string; name?: string; /** * Description for Radio */ description?: string; 'data-testid'?: string; } export interface IRadioGroupContext { type: CheckboxType; } export interface IRadioGroup extends IFormControlContext { value?: string | number; initialValue?: string | number; onChange?: (value: string) => void; children?: React.ReactNode; type?: CheckboxType; isRow?: boolean; }