Current Issue
Currently, you have to use the code block below in any React component that uses to wish the CSS Prop for Emotion (rather than via styled method).
Currently:
/** @jsx jsx */
import { jsx } from '@emotion/core'
Emotion prescribes using the "@emotion/babel-preset-css-prop" babel preset in order to avoid this. However, this does not currently work with Typescript as discussed on the following issue (or as seen by simpling trying to implement it).
Proposed Changes
The proposed changes use the solution described here in order to support the use of the css prop without the need for the pragma statement. This only affects the packages used and the webpack presets/plugins used slightly. All functionality is intact.
Motivation
I think it's important to support both Emotion methodologies (CSS Prop and Styled Components) and doing so without the boiletplate currently needed in order to use the former.
Current Issue Currently, you have to use the code block below in any React component that uses to wish the CSS Prop for Emotion (rather than via styled method).
Currently:
See https://emotion.sh/docs/css-prop for more details.
Emotion prescribes using the "@emotion/babel-preset-css-prop" babel preset in order to avoid this. However, this does not currently work with Typescript as discussed on the following issue (or as seen by simpling trying to implement it).
https://github.com/emotion-js/emotion/issues/1046
Proposed Changes The proposed changes use the solution described here in order to support the use of the css prop without the need for the pragma statement. This only affects the packages used and the webpack presets/plugins used slightly. All functionality is intact.
Motivation I think it's important to support both Emotion methodologies (CSS Prop and Styled Components) and doing so without the boiletplate currently needed in order to use the former.