Sink/app/components/dashboard/metrics/Group.vue
wudi 7cadbfe2b1 refactor: Migrate project files and directories to the app directory using the new compatibilityVersion: 4 feature
- Moved `app.config.ts` to the `app` directory
- Migrated `.vue` files and other assets to the `app` directory
- Updated import paths to reflect the new file locations
2025-03-24 11:05:59 +08:00

41 lines
710 B
Vue

<script setup>
defineProps({
tabs: {
type: Array,
required: true,
},
rawTabs: {
type: Array,
required: true,
},
})
</script>
<template>
<Tabs
:default-value="rawTabs[0]"
class="flex flex-col"
>
<TabsList class="w-fit">
<TabsTrigger
v-for="(tab, index) in tabs"
:key="tab"
:value="rawTabs[index]"
>
{{ tab }}
</TabsTrigger>
</TabsList>
<TabsContent
v-for="(tab, index) in tabs"
:key="tab"
:value="rawTabs[index]"
class="flex-1"
>
<DashboardMetricsMetric
:type="rawTabs[index]"
:name="tab"
class="h-full"
/>
</TabsContent>
</Tabs>
</template>