Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add styled-jsx snippets
  • Loading branch information
aquaductape committed Jun 4, 2020
commit edeced9315ab7d7128b0c55211b37ed5c8ef8286
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ I.E. `tsrcc`
| `rxreducer→` | `redux reducer template` |
| `rxselect→` | `redux selector template` |

## styled-jsx

| Prefix | Method |
| ------: | ----------------------------------- |
| `sjsx` | ``<style jsx>{` `}</style>`` |
| `sjsxg` | ``<style jsx global>{` `}</style>`` |

## PropTypes

| Prefix | Method |
Expand Down Expand Up @@ -775,3 +782,4 @@ export default WrappedComponent => {
return hocComponent
}
```

20 changes: 20 additions & 0 deletions snippets/snippets.json
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,26 @@
""
]
},
"styledJSX": {
"prefix": "sjsx",
"body": [
"<style jsx>{`",
"\t$0",
"`}</style>",
""
],
"description": "Creates a CSS style that is scoped to its React component"
},
"styledJSXGlobal": {
"prefix": "sjsxg",
"body": [
"<style jsx global>{`",
"\t$0",
"`}</style>",
""
],
"description": "Creates a CSS style that is global"
},
"reactNativeComponent": {
"prefix": "rnc",
"body": [
Expand Down