import { FC } from 'react'; import { CheckboxOptionValue, GenericCheckboxGroupOptions, GenericCheckboxGroupProps, GenericCheckboxOption } from '@befe/brick-comp-checkbox'; export type RadioGroupValue = CheckboxOptionValue | null; export type RadioGroupOption = GenericCheckboxOption; export type RadioGroupOptions = GenericCheckboxGroupOptions; export interface RadioGroupProps extends Omit { /** * 自定义 class */ className?: string; /** * 控制选中值 * **注意** 区分 `null` 与 `undefined` * - `null` 为控制值 "未选择" * - `undefined` 为不配置,即不控制 value */ value?: RadioGroupValue; /** * 默认选中值 * - `null` 为 "未选择" * - `undefined` 为不配置,将使用内置默认值 `null` */ defaultValue?: RadioGroupValue; /** * 点选 option 的回调 */ onCheck?: (option: GenericCheckboxOption, value: RadioGroupValue, currentValue: RadioGroupValue) => void; /** * 值变化回调 * null 为 "未选择" */ onChange?: ((nextValue: string | null) => void) | ((nextValue: number | null) => void) | ((nextValue: boolean | null) => void); } export declare const RadioGroup: FC;