Skip to content

Commit

Permalink
✨ add simple snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
volatile-static committed Jan 15, 2023
1 parent ce636bd commit 1ad2832
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .vscode/toolkit.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"createElementsFromJSON - full": {
"scope": "javascript,typescript",
"prefix": [
"createElementsFromJSON"
],
"body": [
"createElementsFromJSON(${0:document}, {",
"\ttag: '${1:div}',",
"}, ${16:true});"
],
"description": "tools/ui/creatElementsFromJSON"
},
"createElementsFromJSON - minimum": {
"scope": "javascript,typescript",
"prefix": [
"createElementsFromJSON"
],
"body": "createElementsFromJSON(document, { tag: '$0' });"
},
"appendElement - full": {
"scope": "javascript,typescript",
"prefix": "appendElement",
"body": [
"appendElement({",
"\ttag: '${1:div}',",
"\tid: '${2:id}',",
"\tnamespace: '${3:html}',",
"\tclassList: ['${4:class}'],",
"\tstyles: {${5:style}: '$6'},",
"\tproperties: {},",
"\tattributes: {},",
"\t[{ '${7:onload}', (e: Event) => $8, ${9:false} }],",
"\tcheckExistanceParent: ${10:HTMLElement},",
"\tignoreIfExists: ${11:true},",
"\tskipIfExists: ${12:true},",
"\tremoveIfExists: ${13:true},",
"\tcustomCheck: (doc: Document, options: ElementOptions) => ${14:true},",
"\tchildren: [$15]",
"}, ${16:container});"
]
},
"appendElement - minimum": {
"scope": "javascript,typescript",
"prefix": "appendElement",
"body": "appendElement({ tag: '$1' }, $2);"
}
}

0 comments on commit 1ad2832

Please sign in to comment.