-
-
Notifications
You must be signed in to change notification settings - Fork 47.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Icon add displayName #5643
Conversation
@handycode, thanks for your PR! By analyzing the history of the files in this pull request, we identified @afc163, @benjycui and @yiminghe to be potential reviewers. |
components/icon/index.tsx
Outdated
@@ -11,7 +11,7 @@ export interface IconProps { | |||
style?: React.CSSProperties; | |||
} | |||
|
|||
export default (props: IconProps) => { | |||
const icon = (props: IconProps) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uppercase first letter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
function Icon() {
...
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -20,3 +20,7 @@ export default (props: IconProps) => { | |||
}, className); | |||
return <i {...omit(props, ['type', 'spin'])} className={classString} />; | |||
}; | |||
|
|||
(Icon as any).displayName = 'Icon'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line would be unnecessary
No description provided.