mirror of
https://github.com/enso-org/enso.git
synced 2024-12-25 18:33:57 +03:00
0a28d91d35
As ~~requested~~ suggested by @radeusgd # Important Notes None
33 lines
814 B
Plaintext
33 lines
814 B
Plaintext
{
|
|
"React Component": {
|
|
"prefix": ["$c", "component"],
|
|
"body": [
|
|
"/** @file $2 */",
|
|
"import * as React from 'react'",
|
|
"",
|
|
"// ====${1/./=/g}====",
|
|
"// === $1 ===",
|
|
"// ====${1/./=/g}====",
|
|
"",
|
|
"/** Props for a {@link ${1:$TM_FILENAME_BASE}}. */",
|
|
"export interface $1Props {",
|
|
" $3",
|
|
"}",
|
|
"",
|
|
"/** $2 */",
|
|
"export default function $1(props: $1Props) {",
|
|
" const { ${3/(.+?):.+/$1, /g} } = props",
|
|
" return <>$4</>",
|
|
"}"
|
|
]
|
|
},
|
|
"useState": {
|
|
"prefix": ["$s", "usestate"],
|
|
"body": ["const [$1, set${1/(.*)/${1:/pascalcase}/}] = React.useState($2)"]
|
|
},
|
|
"section": {
|
|
"prefix": ["$S", "section"],
|
|
"body": ["// ====${1/./=/g}====", "// === $1 ===", "// ====${1/./=/g}===="]
|
|
}
|
|
}
|