mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-18 09:13:26 +03:00
18 lines
500 B
Svelte
18 lines
500 B
Svelte
|
|
<script lang="ts">
|
||
|
|
import type { HTMLAttributes } from "svelte/elements";
|
||
|
|
import { type Variant, alertVariants } from "./index.js";
|
||
|
|
import { cn } from "$lib/utils/style.js";
|
||
|
|
|
||
|
|
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>
|