mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
parent
f85698f70e
commit
6fc4513017
@ -76,7 +76,7 @@ const BackTop: React.FC<BackTopProps> = props => {
|
||||
const rootPrefixCls = getPrefixCls();
|
||||
const [wrapSSR] = useStyle(prefixCls);
|
||||
|
||||
const groupShape = useContext<FloatButtonShape | null>(FloatButtonGroupContext);
|
||||
const groupShape = useContext<FloatButtonShape | undefined>(FloatButtonGroupContext);
|
||||
|
||||
const mergeShape = groupShape || shape;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import type { FloatButtonShape } from './interface';
|
||||
|
||||
const FloatButtonGroupContext = React.createContext<FloatButtonShape | null>(null);
|
||||
const FloatButtonGroupContext = React.createContext<FloatButtonShape | undefined>(undefined);
|
||||
|
||||
export const { Provider: FloatButtonGroupProvider } = FloatButtonGroupContext;
|
||||
|
||||
|
@ -33,7 +33,7 @@ const FloatButton: React.ForwardRefRenderFunction<
|
||||
...restProps
|
||||
} = props;
|
||||
const { getPrefixCls, direction } = useContext<ConfigConsumerProps>(ConfigContext);
|
||||
const groupShape = useContext<FloatButtonShape | null>(FloatButtonGroupContext);
|
||||
const groupShape = useContext<FloatButtonShape | undefined>(FloatButtonGroupContext);
|
||||
const prefixCls = getPrefixCls(floatButtonPrefixCls, customizePrefixCls);
|
||||
const [wrapSSR, hashId] = useStyle(prefixCls);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user