-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
194 additions
and
0 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
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,62 @@ | ||
import { FILENAME_PASCALCASE } from '../constants'; | ||
import { Snippet } from '../types'; | ||
|
||
export const reactFnCompEmotion: Snippet = { | ||
prefix: 'emoRFC', | ||
body: [ | ||
"import * as styles from './styles'", | ||
'', | ||
`export default function \${1:${FILENAME_PASCALCASE}}() {$0`, | ||
'\treturn (', | ||
'\t\t<${2:div} css={styles.${3:container}}>${4:$1}</$2>', | ||
'\t)', | ||
'}', | ||
], | ||
description: 'React Functional Component with Emotion CSS', | ||
}; | ||
|
||
export const reactFnCompExportEmotion: Snippet = { | ||
prefix: 'emoRFCe', | ||
body: [ | ||
"import * as styles from './styles'", | ||
'', | ||
`function \${1:${FILENAME_PASCALCASE}}() {$0`, | ||
'\treturn (', | ||
'\t\t<${2:div} css={styles.${3:container}}>${4:$1}</$2>', | ||
'\t)', | ||
'}', | ||
'', | ||
'export default $1', | ||
], | ||
description: 'React Functional Component with Emotion CSS', | ||
}; | ||
|
||
export const reactArrowFnCompEmotion: Snippet = { | ||
prefix: 'emoRAFC', | ||
body: [ | ||
"import * as styles from './styles'", | ||
'', | ||
`export const \${1:${FILENAME_PASCALCASE}} = () => {$0`, | ||
'\treturn (', | ||
'\t\t<${2:div} css={styles.${3:container}}>${4:$1}</$2>', | ||
'\t)', | ||
'}', | ||
], | ||
description: 'React Arrow Function Component with Emotion CSS', | ||
}; | ||
|
||
export const reactArrowFnCompExportEmotion: Snippet = { | ||
prefix: 'emoRAFCe', | ||
body: [ | ||
"import * as styles from './styles'", | ||
'', | ||
`const \${1:${FILENAME_PASCALCASE}} = () => {$0`, | ||
'\treturn (', | ||
'\t\t<${2:div} css={styles.${3:container}}>${4:$1}</$2>', | ||
'\t)', | ||
'}', | ||
'', | ||
'export default $1', | ||
], | ||
description: 'React Arrow Function Component with Emotion CSS', | ||
}; |