2024-08-12 11:00:25 +02:00
|
|
|
<script lang="ts">
|
2025-01-19 15:41:16 +01:00
|
|
|
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
|
|
|
import * as AlertDialog from './index.js';
|
|
|
|
|
import { cn, flyAndScale } from '$lib/utils/style.js';
|
2024-08-12 11:00:25 +02:00
|
|
|
|
|
|
|
|
type $$Props = AlertDialogPrimitive.ContentProps;
|
|
|
|
|
|
2025-01-19 15:41:16 +01:00
|
|
|
export let transition: $$Props['transition'] = flyAndScale;
|
|
|
|
|
export let transitionConfig: $$Props['transitionConfig'] = undefined;
|
2024-08-12 11:00:25 +02:00
|
|
|
|
2025-01-19 15:41:16 +01:00
|
|
|
let className: $$Props['class'] = undefined;
|
2024-08-12 11:00:25 +02:00
|
|
|
export { className as class };
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<AlertDialog.Portal>
|
|
|
|
|
<AlertDialog.Overlay />
|
|
|
|
|
<AlertDialogPrimitive.Content
|
|
|
|
|
{transition}
|
|
|
|
|
{transitionConfig}
|
|
|
|
|
class={cn(
|
2025-05-07 16:43:24 +02:00
|
|
|
'bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg sm:rounded-lg md:w-full',
|
2024-08-12 11:00:25 +02:00
|
|
|
className
|
|
|
|
|
)}
|
|
|
|
|
{...$$restProps}
|
|
|
|
|
>
|
|
|
|
|
<slot />
|
|
|
|
|
</AlertDialogPrimitive.Content>
|
|
|
|
|
</AlertDialog.Portal>
|