fix: loading indicator not visible

This commit is contained in:
Elias Schneider
2026-09-20 01:32:19 +02:00
parent 98f9e39785
commit 4ba28992ff
@@ -1,26 +1,14 @@
<script lang="ts">
import { cn } from '$lib/utils/style.js';
import Loader2Icon from '@lucide/svelte/icons/loader-2';
import type { SVGAttributes } from 'svelte/elements';
import type { ComponentProps } from 'svelte';
let {
class: className,
role = 'status',
// we add name, color, and stroke for compatibility with different icon libraries props
name,
color,
stroke,
'aria-label': ariaLabel = 'Loading',
...restProps
}: SVGAttributes<SVGSVGElement> = $props();
let { class: className, ...restProps }: ComponentProps<typeof Loader2Icon> = $props();
</script>
<Loader2Icon
{role}
name={name === null ? undefined : name}
color={color === null ? undefined : color}
stroke={stroke === null ? undefined : stroke}
aria-label={ariaLabel}
role="status"
aria-label="Loading"
class={cn('size-4 animate-spin', className)}
{...restProps}
/>