feat: add StatsCard comp

This commit is contained in:
Norbert Maciaszek
2025-11-17 18:41:30 +01:00
parent 5d221c8cc2
commit a2f1a97578

View File

@@ -0,0 +1,19 @@
<script lang="ts">
type Props = {
title: string;
value: number | string;
description?: string;
};
let { title, value, description }: Props = $props();
</script>
<div
class="rounded-2xl bg-gray-200 p-4 shadow-sm transition-all duration-200 ease-in-out hover:shadow-md md:p-6"
>
<div class="mb-1 text-sm text-gray-600">{title}</div>
<div class="text-3xl font-bold text-gray-800">{value}</div>
{#if description}
<div class="mt-2 text-xs text-gray-500">{description}</div>
{/if}
</div>