mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 12:09:14 +08:00
chore: update variable name from groupSize to contextSize (#42396)
This commit is contained in:
parent
3fb12b9e65
commit
26590f6b35
@ -44,7 +44,7 @@ const InternalAvatar: React.ForwardRefRenderFunction<HTMLSpanElement, AvatarProp
|
||||
props,
|
||||
ref,
|
||||
) => {
|
||||
const groupSize = React.useContext(SizeContext);
|
||||
const contextSize = React.useContext<AvatarSize>(SizeContext);
|
||||
|
||||
const [scale, setScale] = React.useState(1);
|
||||
const [mounted, setMounted] = React.useState(false);
|
||||
@ -108,7 +108,7 @@ const InternalAvatar: React.ForwardRefRenderFunction<HTMLSpanElement, AvatarProp
|
||||
...others
|
||||
} = props;
|
||||
|
||||
const size = customSize === 'default' ? groupSize : customSize;
|
||||
const size = customSize === 'default' ? contextSize : customSize;
|
||||
|
||||
const needResponsive = Object.keys(typeof size === 'object' ? size || {} : {}).some((key) =>
|
||||
['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].includes(key),
|
||||
|
Loading…
Reference in New Issue
Block a user