Browse Source

Merge pull request #5643 from handycode/patch-1

fix: Icon add displayName
pull/5755/head
偏右 8 years ago
committed by GitHub
parent
commit
c1c261e081
  1. 6
      components/icon/index.tsx

6
components/icon/index.tsx

@ -11,7 +11,7 @@ export interface IconProps {
style?: React.CSSProperties;
}
export default (props: IconProps) => {
const Icon = (props: IconProps) => {
const { type, className = '', spin } = props;
const classString = classNames({
anticon: true,
@ -20,3 +20,7 @@ export default (props: IconProps) => {
}, className);
return <i {...omit(props, ['type', 'spin'])} className={classString} />;
};
(Icon as any).displayName = 'Icon';
export default Icon;

Loading…
Cancel
Save