Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

added reactFunctionalComponentAndRadium snippet "rrfc"#104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
ai-eye wants to merge1 commit intor5n-labs:masterfromai-eye:master
Closed
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -181,6 +181,12 @@ export default compose(graphql($1, { name: $2 }))($3)
| `cwa→` | `console.warn` |
| `cin→` | `console.info` |

## React Radium

| Prefix | Method |
| ---------: | ------------------------------------ |
| `rrfc→` | `import/export Radium(filename)'` |

## React Components

### `rcc`
Expand DownExpand Up@@ -706,3 +712,24 @@ export default WrappedComponent => {
return hocComponent
}
```

### `rrfc`

```javascript
import React from 'react'
import Radium from 'radium'

function Filename() {
return (
<div style={styles.default}>

</div>
)
}

var styles = {
default: {}
}

export default Radium(Filename)
```
7 changes: 4 additions & 3 deletionspackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
{
"name": "es7-react-js-snippets",
"displayName": "ES7 React/Redux/GraphQL/React-Native snippets",
"description": "Simple extensions for React, ReduxandGraphql in JS/TS with ES7 syntax",
"version": "2.5.0",
"description": "Simple extensions for React, Redux, GraphqlandRadium in JS/TS with ES7 syntax",
"version": "2.5.1",
"publisher": "dsznajder",
"icon": "images/logo.png",
"keywords": [
Expand All@@ -11,7 +11,8 @@
"redux",
"react-native",
"javascript",
"typescript"
"typescript",
"radium"
],
"license": "MIT",
"repository": {
Expand Down
25 changes: 24 additions & 1 deletionsnippets/snippets.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1344,5 +1344,28 @@
"\t};",
"}, [${3:input}])"
]
}
},
"reactFunctionalComponentAndRadium": {
"prefix": "rrfc",
"body": [
"import React from 'react'",
"import Radium from 'radium'",
"",
"function ${1:${TM_FILENAME_BASE}}() {",
"\treturn (",
"\t\t<div style={styles.default}>",
"\t\t\t$0",
"\t\t</div>",
"\t)",
"}",
"",
"var styles = {",
"\tdefault: {}",
"}",
"",
"export default Radium(${1:${TM_FILENAME_BASE}})",
""
],
"description": "Creates a React Functional Component with ES7 module system and Radium"
}
}

[8]ページ先頭

©2009-2025 Movatter.jp