diff --git a/components/radio/context.tsx b/components/radio/context.ts similarity index 100% rename from components/radio/context.tsx rename to components/radio/context.ts diff --git a/components/radio/index.tsx b/components/radio/index.ts similarity index 100% rename from components/radio/index.tsx rename to components/radio/index.ts diff --git a/components/radio/interface.tsx b/components/radio/interface.ts similarity index 100% rename from components/radio/interface.tsx rename to components/radio/interface.ts diff --git a/components/radio/radioButton.tsx b/components/radio/radioButton.tsx index 1cdf3b6a94..2a42c95840 100644 --- a/components/radio/radioButton.tsx +++ b/components/radio/radioButton.tsx @@ -1,4 +1,5 @@ import * as React from 'react'; +import type { CheckboxRef } from '../checkbox'; import type { AbstractCheckboxProps } from '../checkbox/Checkbox'; import { ConfigContext } from '../config-provider'; import { RadioOptionTypeContextProvider } from './context'; @@ -7,17 +8,17 @@ import Radio from './radio'; export type RadioButtonProps = AbstractCheckboxProps; -const RadioButton = (props: RadioButtonProps, ref: React.Ref) => { +const RadioButton: React.ForwardRefRenderFunction = (props, ref) => { const { getPrefixCls } = React.useContext(ConfigContext); const { prefixCls: customizePrefixCls, ...radioProps } = props; const prefixCls = getPrefixCls('radio', customizePrefixCls); return ( - - + + ); }; -export default React.forwardRef(RadioButton); +export default React.forwardRef(RadioButton);