another cute fun react vs code snippet :)
This commit is contained in:
parent
ef7ba58c90
commit
ba3ea5d321
1 changed files with 10 additions and 1 deletions
11
.vscode/impress-2020.code-snippets
vendored
11
.vscode/impress-2020.code-snippets
vendored
|
@ -17,7 +17,7 @@
|
||||||
// }
|
// }
|
||||||
"Component file": {
|
"Component file": {
|
||||||
"scope": "javascript",
|
"scope": "javascript",
|
||||||
"prefix": "component",
|
"prefix": "componentfile",
|
||||||
"body": [
|
"body": [
|
||||||
"import React from \"react\";",
|
"import React from \"react\";",
|
||||||
"import { Box } from \"@chakra-ui/core\";",
|
"import { Box } from \"@chakra-ui/core\";",
|
||||||
|
@ -28,5 +28,14 @@
|
||||||
"",
|
"",
|
||||||
"export default $TM_FILENAME_BASE;"
|
"export default $TM_FILENAME_BASE;"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"Function component": {
|
||||||
|
"scope": "javascript",
|
||||||
|
"prefix": "fncomponent",
|
||||||
|
"body": [
|
||||||
|
"function ${1:Component}({${2:children}}) {",
|
||||||
|
" return ${3:<Box>$4</Box>};",
|
||||||
|
"}"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue