mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
21 lines
486 B
Svelte
21 lines
486 B
Svelte
<script lang="ts">
|
|
import { cn } from "$lib/utils";
|
|
import type { HTMLAttributes } from "svelte/elements";
|
|
import { alertVariants, type Variant } from ".";
|
|
|
|
type $$Props = HTMLAttributes<HTMLDivElement> & {
|
|
variant?: Variant;
|
|
};
|
|
|
|
let className: $$Props["class"] = undefined;
|
|
export let variant: $$Props["variant"] = "default";
|
|
export { className as class };
|
|
</script>
|
|
|
|
<div
|
|
class={cn(alertVariants({ variant }), className)}
|
|
{...$$restProps}
|
|
role="alert"
|
|
>
|
|
<slot />
|
|
</div>
|