Files
homebox/frontend/components/global/StatCard/StatCard.vue
Tonya 9afd20c513 Sort themes and remove daisyui (#643)
* feat: sort themes and remove daisyui

* docs: update docs to reflect daisyui being removed

* feat: remove specific colours for better theme compatibility
2025-04-27 09:01:27 +00:00

32 lines
890 B
Vue

<template>
<Card class="flex flex-col items-center bg-secondary p-3 text-secondary-foreground shadow">
<CardHeader class="p-0">
<CardTitle class="text-sm font-medium">{{ title }}</CardTitle>
</CardHeader>
<CardContent class="p-0 text-2xl font-bold">
<Currency v-if="type === 'currency'" :amount="value" />
<template v-if="type === 'number'">{{ value }}</template>
</CardContent>
<CardFooter v-if="subtitle">{{ subtitle }}</CardFooter>
</Card>
</template>
<script setup lang="ts">
import type { StatsFormat } from "./types";
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from "@/components/ui/card";
type Props = {
title: string;
value: number;
subtitle?: string;
type?: StatsFormat;
};
withDefaults(defineProps<Props>(), {
type: "number",
subtitle: undefined,
});
</script>
<style></style>