import { RadioProps } from './interface'; import { isUndefined } from 'lodash'; import { useControllableValue } from 'ahooks'; import Checkbox from '../Checkbox'; import React from 'react'; // import RadioIcon from './RadioIcon'; const { Group, Icon: RadioIcon } = Checkbox; const Radio = ({ children, onChange, ...restProps }: RadioProps) => { const [value, onValueChange] = useControllableValue(restProps); const onInnerChange = ( data: T[] | T, options: { value: T; label: string; disabled?: boolean }[] ) => { if (!isUndefined(data)) { onValueChange(data); onChange?.(data, options); } }; return ( } > {children} ); }; export default Radio;