Skip to content

Commit

Permalink
feat(docs): improve markdown snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
Sporiff committed Oct 24, 2023
1 parent 605858a commit 0d6acae
Showing 1 changed file with 51 additions and 17 deletions.
68 changes: 51 additions & 17 deletions .vscode/markdown.code-snippets
Original file line number Diff line number Diff line change
@@ -1,36 +1,41 @@
{
"Callout": {
"prefix": "callout",
"prefix": "@callout",
"description": "Add a callout to highlight information",
"body": [
"<Callout type=\"${1|info,note,tip,seealso,important,warning|}\">",
"",
"### ${2:Optional title}",
"",
"${0:${TM_SELECTED_TEXT}}",
"</Callout>"
]
},
"SDK function": {
"prefix": "sdk function",
"prefix": "@function",
"description": "Document an SDK function for reference material",
"body": [
"<Function",
" lang=\"${1:The source SDK language}\"",
" name=\"${2:The name of the method or function}\"",
" link=\"${3:A permalink to the method signature on GitHub}\"",
">",
"<Function>",
"",
"## ${1:Method name}",
"",
"${2:Add a description of the method or function here}",
"",
"${4:Add a description of the method or function here}",
"<slot slot=\"signature\">",
"",
"${3:Add the method signature from the SDK repository here}",
"",
"</slot>"
"",
"<slot slot=\"snippet\">",
"",
"${5:Add the example code snippet here}",
"${4:Add the example code snippet here}",
"",
"</slot>",
"",
"<slot slot=\"parameters\">",
"",
"${6:Optional slot for method parameters}",
"${5:Optional slot for method parameters}",
"",
"</slot>",
"",
Expand All @@ -43,20 +48,44 @@
"</Function>"
]
},
"Fragment": {
"prefix": "@fragment",
"description": "Insert reusable text from another location",
"body": [
"import ${1:Fragment name} from \"${2:Fragment location}\"",
"",
"<${1} />"
]
},
"Accordion": {
"prefix": "insert accordion",
"prefix": "@accordion",
"description": "Insert an accordion (dropdown)",
"body": [
"<Accordion>",
"",
"### ${1:Accordion title}",
"#### ${2:Optional badge text}",
"",
"${0:${TM_SELECTED_TEXT}}",
"",
"</Accordion>"
]
},
"Table": {
"prefix": "@table",
"description": "Insert a markdown table",
"body": [
"<Table ${1|search,resizable,bordered,flex,striped|}>",
"",
"| ${2: Column header 1} | ${3: Column header 2}",
"| --- | --- |"
"| ${4: Column body 1} | ${0: Column body 2}",
"",
"</Table>"
]
},
"List table": {
"prefix": "list table",
"prefix": "@listtable",
"description": "Insert a table defined as a set of lists",
"body": [
"<Table list ${1|search,resizable,bordered,flex,striped|}>",
Expand All @@ -70,30 +99,34 @@
]
},
"Guilabel": {
"prefix": "guilabel",
"prefix": "@guilabel",
"description": "Format text as a GUI label (e.g. a button label or interface label",
"body": [
"<GuiLabel>${0:${TM_SELECTED_TEXT}}</GuiLabel>"
]
},
"MenuSelection": {
"prefix": "menuselection",
"prefix": "@menuselection",
"description": "Format text as a series of menu selections",
"body": [
"<MenuSelection>${0:${TM_SELECTED_TEXT}}</MenuSelection>"
]
},
"Tile": {
"prefix": "tile",
"prefix": "@tile",
"description": "Insert a tile",
"body": [
"<Tile ${1:title=\"${2:An optional title}\"} ${3:icon=\"${4:An optional icon}\"}>",
"<Tile ${1:icon=\"${2:An optional icon}\"}>",
"",
"### ${3:An optional title"
"",
"${0:${TM_SELECTED_TEXT}}",
"",
"</Tile>"
]
},
"Tabs": {
"prefix": "tabs",
"prefix": "@tabs",
"description": "Insert a tab group",
"body": [
"<Tabs>",
Expand All @@ -108,6 +141,7 @@
"### ${11:Tab label}",
"",
"${0:Content}",
"",
"</Tab>",
"</Tabs>"
]
Expand Down

0 comments on commit 0d6acae

Please sign in to comment.