-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsnippets.json
More file actions
33 lines (33 loc) · 797 Bytes
/
snippets.json
File metadata and controls
33 lines (33 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{
"Jest Test": {
"prefix": ["test"],
"body": [
"describe('', () => {",
" test('', () => {",
"",
" })",
"})",
""
],
"description": "A describe block for Jest"
},
"React FC": {
"prefix": ["rfc"],
"body": [
"import React from 'react'",
"import Styles from './${TM_FILENAME_BASE}-styles.scss'",
"",
"const ${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/}: React.FC = () => {",
" return (",
" <div className={Styles.${TM_FILENAME_BASE/([a-z]*)[-]+([a-z]*)/$1${2:/capitalize}/g}Wrap}>",
"",
" </div>",
" )",
"}",
"",
"export default ${TM_FILENAME_BASE/(.*)/${1:/pascalcase}/}",
""
],
"description": "Boilerplate for React Function Component"
}
}