feat: add StatsCard comp
This commit is contained in:
19
src/lib/components/atoms/StatsCard.svelte
Normal file
19
src/lib/components/atoms/StatsCard.svelte
Normal 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>
|
||||
Reference in New Issue
Block a user