@aimake/nanod
Version:
## 设计模式 NANO DESIGN 是面向于企业级中台化应用的解决方案。服务于 ToB 和 ToE 类型的单页应用,应用于各产品中从而产出了一套设计及前端规范。
34 lines (33 loc) • 1 kB
TypeScript
import * as React from 'react';
export interface AvatarProps {
/** Shape of avatar, options:`circle`, `square` */
shape?: 'circle' | 'square';
/** Size of avatar, options:`large`, `small`, `default` */
size?: 'large' | 'small' | 'default';
/** Src of image avatar */
src?: string;
/** Type of the Icon to be used in avatar */
icon?: string;
style?: React.CSSProperties;
prefixCls?: string;
className?: string;
children?: any;
}
export interface AvatarState {
scale: number;
isImgExist: boolean;
}
export default class Avatar extends React.Component<AvatarProps, AvatarState> {
static defaultProps: {
prefixCls: string;
shape: string;
size: string;
};
private avatarChildren;
constructor(props: AvatarProps);
componentDidMount(): void;
componentDidUpdate(prevProps: AvatarProps, prevState: AvatarState): void;
setScale: () => void;
handleImgLoadError: () => void;
render(): JSX.Element;
}