Skip to content

Instantly share code, notes, and snippets.

@feliperdamaceno
Last active June 15, 2024 19:18
Show Gist options
  • Save feliperdamaceno/40ca1b8160d5ff89db0d219acfd51ecf to your computer and use it in GitHub Desktop.
Save feliperdamaceno/40ca1b8160d5ff89db0d219acfd51ecf to your computer and use it in GitHub Desktop.
{
"React Component": {
"prefix": "trc",
"body": [
"interface ${TM_FILENAME_BASE}Props {",
"\t$1",
"}",
"",
"export default function $TM_FILENAME_BASE({ $2 }: ${TM_FILENAME_BASE}Props) {",
"\treturn (",
"\t\t$0",
"\t)",
"}"
],
"description": "Create Typescript React Component."
},
"Vue Component": {
"prefix": "tvc",
"body": [
"<script setup>",
"",
"</script>",
"\t",
"<template>",
"\t$0",
"</template>",
"\t",
"<style scoped>",
"",
"</style>"
],
"description": "Create a Vue Component."
},
"Svelte Component": {
"prefix": "tsc",
"body": [
"<script lang=\"ts\">",
"",
"</script>",
"\t",
"$0",
"\t",
"<style>",
"",
"</style>"
],
"description": "Create a Svelte Component."
},
"Mithril Component": {
"prefix": "tmc",
"body": [
"import m, { type Component } from 'mithril'",
"",
"interface ${TM_FILENAME_BASE}Attrs {",
"\t$1",
"}",
"",
"export default function $TM_FILENAME_BASE(): Component<${TM_FILENAME_BASE}Attrs> {",
"\treturn {",
"\t\tview: ({ attrs }) => $0",
"\t}",
"}"
],
"description": "Create Typescript Mithril Component."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment