{
);
// fix https://fb.me/react-unknown-prop
- const divProps = omit(restProps, ['spinning', 'delay', 'indicator']);
+ const divProps = omit(restProps, ['spinning', 'delay', 'indicator', 'prefixCls']);
const spinElement = (
{
}
}
-export default Spin;
+const SpinFC: SpinFCType = (props: SpinProps) => {
+ const { prefixCls: customizePrefixCls } = props;
+ const { getPrefixCls } = React.useContext(ConfigContext);
+
+ const spinPrefixCls = getPrefixCls('spin', customizePrefixCls);
+
+ const spinClassProps: SpinClassProps = {
+ ...props,
+ spinPrefixCls,
+ };
+ return ;
+};
+
+SpinFC.setDefaultIndicator = (indicator: React.ReactNode) => {
+ defaultIndicator = indicator;
+};
+
+if (process.env.NODE_ENV !== 'production') {
+ SpinFC.displayName = 'Spin';
+}
+
+export default SpinFC;