Skip to content

Instantly share code, notes, and snippets.

@glennstephens
Created June 29, 2020 14:40
Show Gist options
  • Save glennstephens/2ed73959121c7826344b9ad55d25acee to your computer and use it in GitHub Desktop.
Save glennstephens/2ed73959121c7826344b9ad55d25acee to your computer and use it in GitHub Desktop.
Snippets file for Visual Studio Code for use with Comet
{
"Comet Page View": {
"scope": "csharp",
"prefix": "mvuPage",
"body": [
"public class ${1:PageName} : View \n{\n\t[Body]\n\tView body() => new VStack\n\t{\n\t};\n}"
],
"description": "Comet Page View"
},
"Comet State Field": {
"scope": "csharp",
"prefix": "mvuState",
"body": [
"readonly State<${1:type}> ${2:name} = ${3:defaultValue};\n"
],
"description": "Comet State Field"
},
"Comet Full Text": {
"scope": "csharp",
"prefix": "mvuTextFull",
"body": [
"new Text(() => $\"${1:Text}\")\n\t.Color(Color.Black)\n\t.FontSize(32),"
],
"description": "Comet Text with Color and Size"
},
"Comet Simple Text": {
"scope": "csharp",
"prefix": "mvuTextSimple",
"body": [
"new Text(() => $\"${1:Text}\"),"
],
"description": "Comet Text with Text only"
},
"Comet Simple Button": {
"scope": "csharp",
"prefix": "mvuButtonSimple",
"body": [
"new Button(\"${1:ButtonText}\", () => {\n\t${2:// Button Actions}\n}),"
],
"description": "Comet Button with Text only"
},
"Comet Text Field": {
"scope": "csharp",
"prefix": "mvuTextField",
"body": [
"new TextField(${1:StateField}, \"${2:PlaceholderText}\"),"
],
"description": "Comet Text Field"
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment