From 93cc6d5cbc1a6d342c7b3ecc55e30fee2d1c79fd Mon Sep 17 00:00:00 2001 From: handycode Date: Thu, 6 Apr 2017 02:50:12 +0800 Subject: [PATCH 1/5] =?UTF-8?q?Icon=E7=BB=84=E4=BB=B6=E5=A2=9E=E5=8A=A0dis?= =?UTF-8?q?playName?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/icon/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/icon/index.tsx b/components/icon/index.tsx index 6a2bdbe763..a7eade2ad1 100755 --- a/components/icon/index.tsx +++ b/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 ; }; + +icon.displayName = 'Icon'; + +export default icon; From 99639bf5de5bcec4c98810f05c35aa299e5be034 Mon Sep 17 00:00:00 2001 From: handycode Date: Thu, 6 Apr 2017 03:24:47 +0800 Subject: [PATCH 2/5] Update index.tsx --- components/icon/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/icon/index.tsx b/components/icon/index.tsx index a7eade2ad1..6bf6ba2726 100755 --- a/components/icon/index.tsx +++ b/components/icon/index.tsx @@ -21,6 +21,6 @@ const icon = (props: IconProps) => { return ; }; -icon.displayName = 'Icon'; +icon['displayName'] = 'Icon'; export default icon; From fb837ea9a8aed3dd3fb77923ce6e701f94eea5ce Mon Sep 17 00:00:00 2001 From: handycode Date: Thu, 6 Apr 2017 03:36:54 +0800 Subject: [PATCH 3/5] Update index.tsx --- components/icon/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/icon/index.tsx b/components/icon/index.tsx index 6bf6ba2726..91c5555725 100755 --- a/components/icon/index.tsx +++ b/components/icon/index.tsx @@ -19,8 +19,8 @@ const icon = (props: IconProps) => { [`anticon-${type}`]: true, }, className); return ; -}; +} -icon['displayName'] = 'Icon'; +(icon as any).displayName = 'Icon'; export default icon; From 4736a1b9907e76fef5009c92132763889c73d280 Mon Sep 17 00:00:00 2001 From: handycode Date: Thu, 6 Apr 2017 03:41:03 +0800 Subject: [PATCH 4/5] Update index.tsx --- components/icon/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/icon/index.tsx b/components/icon/index.tsx index 91c5555725..726f08eee4 100755 --- a/components/icon/index.tsx +++ b/components/icon/index.tsx @@ -19,7 +19,7 @@ const icon = (props: IconProps) => { [`anticon-${type}`]: true, }, className); return ; -} +}; (icon as any).displayName = 'Icon'; From 4b6c5643e794f4b02a09668bdb8249c17dad6f63 Mon Sep 17 00:00:00 2001 From: handycode Date: Thu, 6 Apr 2017 11:51:48 +0800 Subject: [PATCH 5/5] Update index.tsx --- components/icon/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/icon/index.tsx b/components/icon/index.tsx index 726f08eee4..12786e2483 100755 --- a/components/icon/index.tsx +++ b/components/icon/index.tsx @@ -11,7 +11,7 @@ export interface IconProps { style?: React.CSSProperties; } -const icon = (props: IconProps) => { +const Icon = (props: IconProps) => { const { type, className = '', spin } = props; const classString = classNames({ anticon: true, @@ -21,6 +21,6 @@ const icon = (props: IconProps) => { return ; }; -(icon as any).displayName = 'Icon'; +(Icon as any).displayName = 'Icon'; -export default icon; +export default Icon;