mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-12 15:19:58 +08:00
6683c58b2d
* fix: AvatarGroup item could be wrapped * test: update snapshot * refactor avatarGroup space * test: update snapshot * revert avatarGroupBorderColor
57 lines
2.2 KiB
TypeScript
57 lines
2.2 KiB
TypeScript
import React from 'react';
|
|
import { AntDesignOutlined, UserOutlined } from '@ant-design/icons';
|
|
import { Avatar, Divider, Tooltip } from 'antd';
|
|
|
|
const App: React.FC = () => (
|
|
<>
|
|
<Avatar.Group>
|
|
<Avatar src="https://joeschmoe.io/api/v1/random" />
|
|
<a href="https://ant.design">
|
|
<Avatar style={{ backgroundColor: '#f56a00' }}>K</Avatar>
|
|
</a>
|
|
<Tooltip title="Ant User" placement="top">
|
|
<Avatar style={{ backgroundColor: '#87d068' }} icon={<UserOutlined />} />
|
|
</Tooltip>
|
|
<Avatar style={{ backgroundColor: '#1890ff' }} icon={<AntDesignOutlined />} />
|
|
</Avatar.Group>
|
|
<Divider />
|
|
<Avatar.Group maxCount={2} maxStyle={{ color: '#f56a00', backgroundColor: '#fde3cf' }}>
|
|
<Avatar src="https://joeschmoe.io/api/v1/random" />
|
|
<Avatar style={{ backgroundColor: '#f56a00' }}>K</Avatar>
|
|
<Tooltip title="Ant User" placement="top">
|
|
<Avatar style={{ backgroundColor: '#87d068' }} icon={<UserOutlined />} />
|
|
</Tooltip>
|
|
<Avatar style={{ backgroundColor: '#1890ff' }} icon={<AntDesignOutlined />} />
|
|
</Avatar.Group>
|
|
<Divider />
|
|
<Avatar.Group
|
|
maxCount={2}
|
|
size="large"
|
|
maxStyle={{ color: '#f56a00', backgroundColor: '#fde3cf' }}
|
|
>
|
|
<Avatar src="https://joeschmoe.io/api/v1/random" />
|
|
<Avatar style={{ backgroundColor: '#f56a00' }}>K</Avatar>
|
|
<Tooltip title="Ant User" placement="top">
|
|
<Avatar style={{ backgroundColor: '#87d068' }} icon={<UserOutlined />} />
|
|
</Tooltip>
|
|
<Avatar style={{ backgroundColor: '#1890ff' }} icon={<AntDesignOutlined />} />
|
|
</Avatar.Group>
|
|
<Divider />
|
|
<Avatar.Group
|
|
maxCount={2}
|
|
maxPopoverTrigger="click"
|
|
size="large"
|
|
maxStyle={{ color: '#f56a00', backgroundColor: '#fde3cf', cursor: 'pointer' }}
|
|
>
|
|
<Avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" />
|
|
<Avatar style={{ backgroundColor: '#f56a00' }}>K</Avatar>
|
|
<Tooltip title="Ant User" placement="top">
|
|
<Avatar style={{ backgroundColor: '#87d068' }} icon={<UserOutlined />} />
|
|
</Tooltip>
|
|
<Avatar style={{ backgroundColor: '#1890ff' }} icon={<AntDesignOutlined />} />
|
|
</Avatar.Group>
|
|
</>
|
|
);
|
|
|
|
export default App;
|