Last active
June 15, 2024 19:18
-
-
Save feliperdamaceno/40ca1b8160d5ff89db0d219acfd51ecf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"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