2024-12-01 17:20:21 +01:00
|
|
|
<script setup lang="ts">
|
2025-06-26 22:39:02 +02:00
|
|
|
import { AlertDialogCancel, type AlertDialogCancelProps } from "reka-ui";
|
|
|
|
|
import { computed, type HTMLAttributes } from "vue";
|
2025-03-28 01:16:24 +01:00
|
|
|
import { buttonVariants } from "@/components/ui/button";
|
2024-12-01 17:20:21 +01:00
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
|
|
|
|
|
|
const props = defineProps<
|
|
|
|
|
AlertDialogCancelProps & { class?: HTMLAttributes["class"] }
|
|
|
|
|
>();
|
|
|
|
|
|
|
|
|
|
const delegatedProps = computed(() => {
|
|
|
|
|
const { class: _, ...delegated } = props;
|
|
|
|
|
|
|
|
|
|
return delegated;
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<AlertDialogCancel
|
|
|
|
|
v-bind="delegatedProps"
|
|
|
|
|
:class="cn(
|
|
|
|
|
buttonVariants({ variant: 'outline' }),
|
|
|
|
|
'mt-2 sm:mt-0',
|
|
|
|
|
props.class,
|
|
|
|
|
)"
|
|
|
|
|
>
|
|
|
|
|
<slot />
|
|
|
|
|
</AlertDialogCancel>
|
|
|
|
|
</template>
|