UNPKG

cjd-parkball

Version:

> 中后台业务组件库,中后台就像公园,进入需要买门票(登录),所以以 Parkball(公园球) 命名,公园内必定捕获!作为一个组件库,提供使用方法文档,方便开发者的调用

36 lines (28 loc) 812 B
--- category: 2 title: 类型 title_en: Type --- zh-CN 支持三种类型:图片、Icon 以及字符,其中 Icon 和字符型可以自定义图标颜色及背景色。 en-US Image, Icon and letter are supported, and the latter two kinds avatar can have custom colors and background colors. ````jsx import { Avatar } from 'parkball'; ReactDOM.render( <div> <Avatar icon="user" /> <Avatar>U</Avatar> <Avatar>USER</Avatar> <Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" /> <Avatar style={{ color: '#f56a00', backgroundColor: '#fde3cf' }}>U</Avatar> <Avatar style={{ backgroundColor: '#87d068' }} icon="user" /> </div>, mountNode); ```` <style> #components-avatar-demo-type .ant-avatar { margin-top: 16px; margin-right: 16px; } </style>