-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add more context to the styled component displayName #361
Conversation
packages/react-emotion/src/index.js
Outdated
Styled.contextTypes = contextTypes | ||
|
||
Styled.__emotion_styles = styles | ||
Styled.__emotion_base = baseTag | ||
Styled.__emotion_real = Styled | ||
|
||
Styled.displayName = `Styled(${typeof baseTag === 'string' | ||
? baseTag | ||
: baseTag.displayName || 'Component'})` |
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.
Should baseTag.name
also be here?
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.
Not sure where name
comes from.
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.
Codecov Report
@@ Coverage Diff @@
## master #361 +/- ##
==========================================
+ Coverage 97.73% 97.74% +<.01%
==========================================
Files 22 22
Lines 663 664 +1
Branches 151 152 +1
==========================================
+ Hits 648 649 +1
Misses 11 11
Partials 4 4
Continue to review full report at Codecov.
|
What:
Add the base_tag displayName to the styled component
Why:
So they show up in React dev tools.
#358
How:
Append the property
Checklist:
closes #358