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