-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support multiple jsx block (components) per file (#45)
- Loading branch information
Showing
4 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
const Test = () => <span>test</span> | ||
|
||
const Test2 = () => ( | ||
<div> | ||
<span>test</span> | ||
<style jsx>{` | ||
span { | ||
color: red; | ||
} | ||
`}</style> | ||
</div> | ||
) | ||
|
||
export default class { | ||
render () { | ||
return ( | ||
<div> | ||
<p>test</p> | ||
<style jsx>{` | ||
p { | ||
color: red; | ||
} | ||
`}</style> | ||
</div> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import _JSXStyle from "styled-jsx/style"; | ||
const Test = () => <span>test</span>; | ||
|
||
const Test2 = () => <div data-jsx={1535297024}> | ||
<span data-jsx={1535297024}>test</span> | ||
<_JSXStyle styleId={1535297024} css={"span[data-jsx=\"1535297024\"] {color: red;}"} /> | ||
</div>; | ||
|
||
export default class { | ||
render() { | ||
return <div data-jsx={1891769468}> | ||
<p data-jsx={1891769468}>test</p> | ||
<_JSXStyle styleId={1891769468} css={"p[data-jsx=\"1891769468\"] {color: red;}"} /> | ||
</div>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters