mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +08:00
ignore className and style props
This commit is contained in:
parent
bab50e6bed
commit
87594997d2
@ -42,7 +42,7 @@ const CustomIcon: React.SFC<CustomIconProps> = (props) => {
|
||||
}, className);
|
||||
|
||||
let content = (
|
||||
<svg {...omit(props, ['spin'])} {...svgBaseProps} viewBox={viewBox}>
|
||||
<svg {...omit(props, ['type', 'spin', 'className', 'style'])} {...svgBaseProps} viewBox={viewBox}>
|
||||
{children}
|
||||
</svg>
|
||||
);
|
||||
@ -81,7 +81,7 @@ export function create(options: CustomIconOptions = {}): React.ComponentClass<Ic
|
||||
<i className={classString}>
|
||||
<svg
|
||||
{...extraCommonProps}
|
||||
{...omit(this.props, ['type', 'spin'])}
|
||||
{...omit(this.props, ['type', 'spin', 'className', 'style'])}
|
||||
{...svgBaseProps}
|
||||
>
|
||||
<use xlinkHref={`#${prefix}${type}`}/>
|
||||
|
@ -24,7 +24,7 @@ const Icon: React.SFC<IconProps> = (props: IconProps) => {
|
||||
}, className);
|
||||
return (
|
||||
<i className={classString}>
|
||||
<AntdIcon {...omit(props, ['type', 'spin'])} type={type} />
|
||||
<AntdIcon {...omit(props, ['type', 'spin', 'className', 'style'])} type={type} />
|
||||
</i>
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user