Files
console/src/lib/components/usageCard.svelte
T
2025-03-19 14:27:10 +05:30

24 lines
785 B
Svelte

<script lang="ts">
import { Card } from '$lib/components';
import { Layout, Skeleton, Typography } from '@appwrite.io/pink-svelte';
export let description: string;
export let value: string | number = null;
</script>
<Card radius="s" padding="xs">
<Layout.Stack gap="xxxs">
<Typography.Caption variant="400" color="--fgcolor-neutral-tertiary">
{description}
</Typography.Caption>
<slot>
{#if value !== null && value !== undefined}
<Typography.Text size="s" truncate color="--fgcolor-neutral-primary"
>{value}</Typography.Text>
{:else}
<Skeleton variant="line" width="100%" height={19.5} />
{/if}
</slot>
</Layout.Stack>
</Card>