ant-design/components/avatar/demo/responsive.md
MadCcc 6776bb8916
docs: demo support react18 (#34843)
* docs: update demo

* chore: add script

* test: fix demo test

* docs: convert demos

* chore: move script

* test: remove react-dom import

* chore: update deps

* docs: update riddle js

* test: fix image test

* docs: fix riddle demo
2022-04-03 23:27:45 +08:00

453 B

order title
5
zh-CN en-US
响应式尺寸 Responsive Size

zh-CN

头像大小可以根据屏幕大小自动调整。

en-US

Avatar size can be automatically adjusted based on the screen size.

import { Avatar } from 'antd';
import { AntDesignOutlined } from '@ant-design/icons';

export default () => (
  <Avatar
    size={{ xs: 24, sm: 32, md: 40, lg: 64, xl: 80, xxl: 100 }}
    icon={<AntDesignOutlined />}
  />
);