mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 08:59:15 +08:00
d375cbd1b6
* feat: Avatar support size from ConfigProvider * Update components/avatar/avatar.tsx Co-authored-by: MadCcc <1075746765@qq.com> Signed-off-by: lijianan <574980606@qq.com> * test: update snap * Update components/avatar/AvatarContext.ts Co-authored-by: MadCcc <1075746765@qq.com> Signed-off-by: lijianan <574980606@qq.com> --------- Signed-off-by: lijianan <574980606@qq.com> Co-authored-by: MadCcc <1075746765@qq.com>
14 lines
370 B
TypeScript
14 lines
370 B
TypeScript
import * as React from 'react';
|
|
import type { ScreenSizeMap } from '../_util/responsiveObserver';
|
|
|
|
export type AvatarSize = 'large' | 'small' | 'default' | number | ScreenSizeMap;
|
|
|
|
export interface AvatarContextType {
|
|
size?: AvatarSize;
|
|
shape?: 'circle' | 'square';
|
|
}
|
|
|
|
const AvatarContext = React.createContext<AvatarContextType>({});
|
|
|
|
export default AvatarContext;
|