teoldalad/lib/components/bio/widgets/Discord/Status.svelte
2024-03-13 00:30:45 +01:00

19 lines
584 B
Svelte

<script lang="ts">
import statuses from '$lib/discord-statuses';
export let status: string;
export let activity: string | null | undefined = undefined;
const statusObject = statuses.find((x) => x.id == status);
</script>
{#if statusObject}
<span
class="font-medium text-[var(--color)] before:inline-block before:content-[''] before:w-3 before:h-3 before:min-w-[0.75rem] before:min-h-[0.75rem] before:bg-[var(--color)] before:rounded-full before:mr-1"
style="--color: {statusObject.color}">
{statusObject.text}
</span>
{#if activity}
and
{/if}
{/if}