mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-05 15:39:45 +08:00
use antd-icons
This commit is contained in:
parent
8496e8f687
commit
7503a0c827
@ -1,6 +1,10 @@
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import omit from 'omit.js';
|
||||
import { library, antDesignIcons } from 'antd-icons/esm';
|
||||
import AntdIcon from 'react-antd-icons/esm';
|
||||
|
||||
library.add(...antDesignIcons);
|
||||
|
||||
export interface IconProps {
|
||||
type: string;
|
||||
@ -16,9 +20,8 @@ const Icon = (props: IconProps) => {
|
||||
const classString = classNames({
|
||||
anticon: true,
|
||||
'anticon-spin': !!spin || type === 'loading',
|
||||
[`anticon-${type}`]: true,
|
||||
}, className);
|
||||
return <i {...omit(props, ['type', 'spin'])} className={classString} />;
|
||||
return <AntdIcon {...omit(props, ['spin'])} className={classString} />;
|
||||
};
|
||||
|
||||
export default Icon;
|
||||
|
@ -299,6 +299,10 @@
|
||||
display: inline-block;
|
||||
animation: loadingCircle 1s infinite linear;
|
||||
}
|
||||
.@{iconfont-css-prefix}-spin {
|
||||
display: inline-block;
|
||||
animation: loadingCircle 1s infinite linear;
|
||||
}
|
||||
|
||||
.@{iconfont-css-prefix}-weibo-square:before { content: "\e6f5"; }
|
||||
.@{iconfont-css-prefix}-weibo-circle:before { content: "\e6f4"; }
|
||||
|
@ -39,6 +39,7 @@
|
||||
"react-dom": ">=16.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"antd-icons": "^0.1.0-alpha.1",
|
||||
"array-tree-filter": "^2.0.0",
|
||||
"babel-runtime": "6.x",
|
||||
"classnames": "~2.2.0",
|
||||
@ -82,6 +83,7 @@
|
||||
"rc-trigger": "^2.5.4",
|
||||
"rc-upload": "~2.5.0",
|
||||
"rc-util": "^4.0.4",
|
||||
"react-antd-icons": "^0.1.0-alpha.4",
|
||||
"react-lazy-load": "^3.0.12",
|
||||
"react-lifecycles-compat": "^3.0.4",
|
||||
"react-slick": "~0.23.1",
|
||||
|
Loading…
Reference in New Issue
Block a user