mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-05 17:59:57 +08:00
7fd093bd0a
* docs: add general components TS demo * docs: add layout components TS demo * docs: add navigation components TS demo * docs: add data entry components TS demo * chore(deps): add types for qs * docs: add data display TS demo * docs: add feedback components TS demo * docs: add other components TS demo * chore(deps): add types * docs: unified demo code style * docs: fix lint error * docs: add demo TS type * docs: fix demo TS type * test: update snapshot * docs: fix TS demo * feat: update Rate character type * docs: fix lint error * feat: update Rate character type * feat: update Rate character type
865 B
865 B
order | title | ||||
---|---|---|---|---|---|
0 |
|
zh-CN
通过 @ant-design/icons
引用 Icon 组件,不同主题的 Icon 组件名为图标名加主题做为后缀,也可以通过设置 spin
属性来实现动画旋转效果。
en-US
Import icons from @ant-design/icons
, component name of icons with different theme is the icon name suffixed by the theme name. Specify the spin
property to show spinning animation.
import React from 'react';
import { Space } from 'antd';
import {
HomeOutlined,
SettingFilled,
SmileOutlined,
SyncOutlined,
LoadingOutlined,
} from '@ant-design/icons';
const App: React.FC = () => (
<Space>
<HomeOutlined />
<SettingFilled />
<SmileOutlined />
<SyncOutlined spin />
<SmileOutlined rotate={180} />
<LoadingOutlined />
</Space>
);
export default App;