mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
remove svgClassName
This commit is contained in:
parent
0884490d6d
commit
e91aa112bf
@ -26,7 +26,6 @@ ReactDOM.render(<IconDisplay />, mountNode);
|
||||
| style | Style properties of icon, like `fontSize` and `color` | CSSProperties | - |
|
||||
| theme | Theme of the ant design icon | 'filled' \| 'outlined' \| 'twoTone' | - |
|
||||
| svgStyle | Inline style to apply to the SVG element | CSSProperties | - |
|
||||
| svgClassName | Define extra class name for the SVG element | string | - |
|
||||
| spin | Rotate icon with animation | boolean | false |
|
||||
| component | The component used for the root node. This will override the **`type`** property. | ComponentType<CustomIconComponentProps\> | - |
|
||||
| twoToneColor | Only support the two-tone icon. Specific the primary color. | string (hex color) | - |
|
||||
|
@ -52,7 +52,6 @@ const Icon: React.SFC<IconProps> = (props) => {
|
||||
component: Component,
|
||||
viewBox,
|
||||
spin,
|
||||
svgClassName,
|
||||
svgStyle = {},
|
||||
|
||||
// children
|
||||
@ -75,7 +74,7 @@ const Icon: React.SFC<IconProps> = (props) => {
|
||||
|
||||
const svgClassString = classNames({
|
||||
[`anticon-spin`]: !!spin || type === 'loading',
|
||||
}, svgClassName);
|
||||
});
|
||||
|
||||
// component > children > type
|
||||
if (Component) {
|
||||
|
@ -31,7 +31,6 @@ ReactDOM.render(<IconDisplay />, mountNode);
|
||||
| style | 设置图标的样式,例如 `fontSize` 和 `color` | CSSProperties | - |
|
||||
| theme | 图标主题风格。可选实心、描线、双色等主题风格,适用于官方图标 | 'filled' \| 'outlined' \| 'twoTone' | - |
|
||||
| svgStyle | 设置图标本身`<svg>`标签的样式 | CSSProperties | - |
|
||||
| svgClassName | 为图标本身`<svg>`标签设置额外的类名 | string | - |
|
||||
| spin | 是否有旋转动画 | boolean | false |
|
||||
| component | 控制如何渲染图标,通常是一个渲染根标签为 `<svg>` 的 `React` 组件,**会使 `type` 属性失效** | ComponentType<CustomIconComponentProps\> | - |
|
||||
| twoToneColor | 仅适用双色图标。设置双色图标的主要颜色。 | string (十六进制颜色) | - |
|
||||
|
@ -2,7 +2,3 @@
|
||||
@import "../../style/mixins/index";
|
||||
|
||||
@icon-prefix-cls: ~"@{ant-prefix}-icon";
|
||||
|
||||
.@{icon-prefix-cls} {
|
||||
// noop
|
||||
}
|
||||
|
@ -61,7 +61,6 @@ export default class Pagination extends React.Component<PaginationProps, {}> {
|
||||
<div className={`${prefixCls}-item-container`}>
|
||||
<Icon
|
||||
className={`${prefixCls}-item-link-icon`}
|
||||
svgClassName={`${prefixCls}-item-link-icon-svg`}
|
||||
type="double-left"
|
||||
/>
|
||||
<span className={`${prefixCls}-item-ellipsis`}>•••</span>
|
||||
@ -74,7 +73,6 @@ export default class Pagination extends React.Component<PaginationProps, {}> {
|
||||
<div className={`${prefixCls}-item-container`}>
|
||||
<Icon
|
||||
className={`${prefixCls}-item-link-icon`}
|
||||
svgClassName={`${prefixCls}-item-link-icon-svg`}
|
||||
type="double-right"
|
||||
/>
|
||||
<span className={`${prefixCls}-item-ellipsis`}>•••</span>
|
||||
|
@ -56,7 +56,6 @@ export default class Switch extends React.Component<SwitchProps, {}> {
|
||||
<Icon
|
||||
type="loading-3-quarters"
|
||||
className={`${prefixCls}-loading-icon`}
|
||||
svgClassName={`${prefixCls}-loading-icon-svg`}
|
||||
/>
|
||||
) : null;
|
||||
return (
|
||||
|
@ -57,7 +57,7 @@
|
||||
z-index: 1;
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
&-svg {
|
||||
svg {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
|
@ -55,7 +55,6 @@ export default class TreeSelect extends React.Component<TreeSelectProps, any> {
|
||||
<Icon
|
||||
type="loading"
|
||||
className={`${prefixCls}-switcher-loading-icon`}
|
||||
svgClassName={`${prefixCls}-switcher-loading-icon-svg`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -73,7 +73,7 @@
|
||||
color: @primary-color;
|
||||
transform: none;
|
||||
font-size: 14px;
|
||||
&-svg {
|
||||
svg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
@ -111,7 +111,7 @@
|
||||
color: @primary-color;
|
||||
transform: none;
|
||||
font-size: 14px;
|
||||
&-svg {
|
||||
svg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
@ -163,7 +163,6 @@ export default class Tree extends React.Component<TreeProps, any> {
|
||||
<Icon
|
||||
type="loading"
|
||||
className={`${prefixCls}-switcher-loading-icon`}
|
||||
svgClassName={`${prefixCls}-switcher-loading-icon-svg`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@ -178,8 +177,9 @@ export default class Tree extends React.Component<TreeProps, any> {
|
||||
}
|
||||
return (
|
||||
<Icon
|
||||
type={expanded ? 'minus-square-o' : 'plus-square-o'}
|
||||
type={expanded ? 'minus-square' : 'plus-square'}
|
||||
className={`${prefixCls}-switcher-line-icon`}
|
||||
theme={'outlined'}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
|
@ -76,7 +76,7 @@
|
||||
color: @primary-color;
|
||||
transform: none;
|
||||
font-size: 14px;
|
||||
&-svg {
|
||||
svg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
|
Loading…
Reference in New Issue
Block a user