Added statscard component

This commit is contained in:
Nicolai Ort 2021-08-16 16:04:32 +02:00
parent c94446c122
commit 895b6045f7
Signed by: niggl
GPG Key ID: 13AFA55AF62F269F
1 changed files with 44 additions and 0 deletions

44
src/lib/Statscard.svelte Normal file
View File

@ -0,0 +1,44 @@
<script>
export let title = 'Title';
export let count = 0;
</script>
<div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-900">
<div
class="p-3 mr-4 text-red-500 bg-red-100 rounded-full dark:text-red-100 dark:bg-red-500"
>
<svg width="24" height="24" fill="none" viewBox="0 0 24 24">
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.5"
d="M4.75 8.75C4.75 7.64543 5.64543 6.75 6.75 6.75H17.25C18.3546 6.75 19.25 7.64543 19.25 8.75V17.25C19.25 18.3546 18.3546 19.25 17.25 19.25H6.75C5.64543 19.25 4.75 18.3546 4.75 17.25V8.75Z"
/>
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.5"
d="M8 4.75V8.25"
/>
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.5"
d="M16 4.75V8.25"
/>
<path
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.5"
d="M7.75 10.75H16.25"
/>
</svg>
</div>
<div>
<p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400">{title}</p>
<p class="text-lg font-semibold text-gray-700 dark:text-gray-200">{count}</p>
</div>
</div>