Created
June 12, 2020 00:55
-
-
Save danielhusar/57d961f54d1ee218101c39004d483822 to your computer and use it in GitHub Desktop.
Vs code snippets
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
{ | |
"rc": { | |
"prefix": "rc", | |
"body": [ | |
"import React from 'react'", | |
"", | |
"interface ${1:${TM_FILENAME_BASE/((^[a-z])|[-,_]([a-z]))/${2:/upcase}${3:/upcase}/g}}Props {", | |
" $3", | |
"}", | |
"", | |
"export default function $1(props: $1Props) {", | |
" return $2", | |
"}", | |
], | |
"description": "React component" | |
}, | |
"rcc": { | |
"prefix": "rcc", | |
"body": [ | |
"import React ${4} from 'react'", | |
"", | |
"interface ${1:${TM_FILENAME_BASE/((^[a-z])|[-,_]([a-z]))/${2:/upcase}${3:/upcase}/g}}Props {", | |
" children: React.ReactNode", | |
" $3", | |
"}", | |
"", | |
"export default function $1({ children }: $1Props) {", | |
" return <>$2{children}</>", | |
"}", | |
], | |
"description": "React component" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment