11# Configurable Imports
22
3- If you are using ES Module imports (` import styled from 'emotion' ` )
4- the emotion babel plugin can handle two types of import renaming.
3+ If you are using ES Module imports (`import styled from
4+ 'react-emotion'`) the emotion babel plugin can handle two types of
5+ import renaming.
56
67## Dynamic
78
89``` js
9- import something , { css as cows } from ' emotion' ;
10+ import something , { css as cows } from ' react- emotion' ;
1011
1112const classes = cows`
1213 color: red;
@@ -39,7 +40,7 @@ styled-jsx application. When compiling the following file with emotion
3940and styled-jsx.
4041
4142``` js
42- import styled , { css } from " emotion" ;
43+ import styled from " react- emotion" ;
4344
4445export default () => (
4546 < div>
@@ -61,7 +62,7 @@ outputs.
6162``` js
6263import _JSXStyle from " styled-jsx/style" ;
6364import { css as _css } from " emotion" ;
64- import styled , { css } from " emotion" ;
65+ import styled from " react- emotion" ;
6566
6667export default (() => < div data- jsx= {2648947580 }>
6768 < p data- jsx= {2648947580 }> only this paragraph will get the style : )< / p>
@@ -91,7 +92,7 @@ We can avoid re-compiling the `css` props from styled-jsx.
9192
9293``` js
9394import _JSXStyle from " styled-jsx/style" ;
94- import styled , { css } from " emotion" ;
95+ import styled , { css } from " react- emotion" ;
9596
9697export default (() => < div data- jsx= {2648947580 }>
9798 < p data- jsx= {2648947580 }> only this paragraph will get the style : )< / p>
0 commit comments