ignore className and style props

This commit is contained in:
HeskeyBaozi 2018-07-23 12:06:07 +08:00
parent bab50e6bed
commit 87594997d2
2 changed files with 3 additions and 3 deletions

View File

@ -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}`}/>

View File

@ -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>
);
};