ant-design/components/avatar/AvatarContext.ts
lijianan d375cbd1b6
feat: Avatar support size from ConfigProvider (#44288)
* 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>
2023-08-18 14:54:35 +08:00

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;