-
-
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
[babel-plugin-emotion][react-emotion] Adds Support for Components as Selectors Using the Object Syntax #501 #503
[babel-plugin-emotion][react-emotion] Adds Support for Components as Selectors Using the Object Syntax #501 #503
Conversation
…Selectors Using the Object Syntax #501
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.
Thanks!! It would be great to have specific documentation for it, could you add an example with the object syntax below the string one in docs/styled.md?
packages/react-emotion/src/index.js
Outdated
process.env.NODE_ENV !== 'production' && | ||
stableClassName === undefined | ||
) { | ||
throw new Error('') |
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.
Could you add make this error be 'Component selectors can only be used in conjunction with babel-plugin-emotion.'
@mitchellhamilton Absolutely! I will add the documentation right away. It looks like CI is failing because of the size? Is this going to be an issue? |
@smlmrkhlms In the root package.json, in the bundlesize section, increase the react-emotion limit to 9.1kb |
Codecov Report
|
Could you add a test here to with something like this expect(() => {
// try to use a component selector with the object syntax
}).toThrowErrorMatchingSnapshot() |
@mitchellhamilton Thanks for your help and guidance! |
Issue #501
What: Adding the ability to use components as selectors when object syntax is being used.
Why: To achieve api parity regardless of the syntax being used.
How: Under direction of @mitchellhamilton via comments on issue #501.
Checklist: