-
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.
<style> as a top-level component (#75)
* <style> as a top-level component * pass path to findStyles instead of its children
- Loading branch information
Showing
5 changed files
with
51 additions
and
34 deletions.
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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
<div> | ||
<style jsx global>{` | ||
body { | ||
color: red | ||
} | ||
`}</style> | ||
</div> | ||
const Test = () => ( | ||
<div> | ||
<style jsx global>{` | ||
body { | ||
color: red | ||
} | ||
`}</style> | ||
</div> | ||
) | ||
|
||
const Test2 = () => <style global jsx>{'p { color: red }'}</style> |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import _JSXStyle from "styled-jsx/style"; | ||
<div data-jsx={3367785191}> | ||
<_JSXStyle styleId={3367785191} css={"\n body {\n color: red\n }\n "} /> | ||
</div>; | ||
import _JSXStyle from 'styled-jsx/style'; | ||
const Test = () => <div data-jsx={733744743}> | ||
<_JSXStyle styleId={733744743} css={"\n body {\n color: red\n }\n "} /> | ||
</div>; | ||
|
||
const Test2 = () => <_JSXStyle styleId={188072295} css={"p { color: red }"} />; |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
const Test = () => <style global jsx>{'p { color: red }'}</style> | ||
|
||
export default () => ( | ||
<div> | ||
<p>test</p> | ||
|
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