Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for emotion 10. I would love to see this out quickly and would be happy to make edits. The new features are:
Enable template literal and non
css
prop object stylesChanges:
@emotion/core
and@emotion/styled
tosupports
object. These are the new imports for emotion 10. Frompostcss-jsx
's perspective everything else is the same.Enable object style for
css
propThis is not straight forward anymore. Due to emotion 10's "magic" surrounding
React.createElement
, the component's namespace does not obviously reference emotion. Template literals in thecss
prop works because the literal itself can be traced back emotion. Object styles can not. The strategy used here (for lack of a better idea) is to assume allcss
props are styles when@emotion/core
is imported. This seems reasonable because@emotion/core
also treatscss
props this way.Changes:
cssPropsImpliesStyle
object andcssPropsIsStyle
flag. I wrote this to be generic like thesupports
object in anticipation others will follow emotion 10's lead.This fixes #43