ant-design/components/avatar/AvatarContext.ts
lijianan deea6feecf
feat: Avatar.Group support shape props (#43817)
* feat: Avatar.Group support shape props

* test: update snap

* test: add test case

* Update components/avatar/avatar.tsx

Co-authored-by: MadCcc <1075746765@qq.com>
Signed-off-by: lijianan <574980606@qq.com>

* fix

* test: update test case

* fix: rename

* rename

* fix

* fix

* fix

* fix demo

---------

Signed-off-by: lijianan <574980606@qq.com>
Co-authored-by: MadCcc <1075746765@qq.com>
2023-07-27 20:04:32 +08:00

14 lines
405 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>({ size: 'default', shape: undefined });
export default AvatarContext;