mealie/frontend/components/global/StatsCards.vue
Hoa (Kyle) Trinh c24d532608
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Docker Nightly Production / Backend Server Tests (push) Waiting to run
Docker Nightly Production / Frontend Tests (push) Waiting to run
Docker Nightly Production / Build Package (push) Waiting to run
Docker Nightly Production / Build Tagged Release (push) Blocked by required conditions
Docker Nightly Production / Notify Discord (push) Blocked by required conditions
Release Drafter / ✏️ Draft release (push) Waiting to run
feat: Migrate to Nuxt 3 framework (#5184)
Co-authored-by: Michael Genson <71845777+michael-genson@users.noreply.github.com>
Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
2025-06-19 17:09:12 +00:00

63 lines
1.1 KiB
Vue

<template>
<v-card
:min-width="minWidth"
:to="to"
:hover="to ? true : false"
>
<div class="d-flex flex-no-wrap">
<v-avatar
class="ml-3 mr-0 mt-3"
color="primary"
size="36"
>
<v-icon
color="white"
class="pa-1"
size="x-large"
>
{{ activeIcon }}
</v-icon>
</v-avatar>
<div>
<v-card-title class="text-subtitle-1 pt-2 pb-2">
<slot name="title" />
</v-card-title>
<v-card-subtitle class="pb-2">
<slot name="value" />
</v-card-subtitle>
</div>
</div>
</v-card>
</template>
<script lang="ts">
export default defineNuxtComponent({
props: {
icon: {
type: String,
default: null,
},
minWidth: {
type: String,
default: "",
},
to: {
type: String,
default: null,
},
},
setup(props) {
const { $globals } = useNuxtApp();
const activeIcon = computed(() => {
return props.icon ?? $globals.icons.primary;
});
return {
activeIcon,
};
},
});
</script>
<style scoped></style>