Skip to content

Instantly share code, notes, and snippets.

@sadewole
Created December 11, 2021 21:28
Show Gist options
  • Save sadewole/86e54feacb525c23e8e44c7ea02bddb4 to your computer and use it in GitHub Desktop.
Save sadewole/86e54feacb525c23e8e44c7ea02bddb4 to your computer and use it in GitHub Desktop.
Tab.vue - script
<script lang="ts">
import { inject, defineComponent, Ref, ref } from "vue";
export default defineComponent({
name: "Tab",
props: {
value: { type: String, required: true },
label: { type: String, required: true },
},
setup() {
const groupName = inject("groupName") as string;
const selectedTab: Ref<string> = inject("selectedTab", ref(""));
return { groupName, selectedTab };
},
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment