2024-12-01 17:20:21 +01:00
|
|
|
<script setup lang="ts">
|
2025-06-26 22:39:02 +02:00
|
|
|
import { AlertDialogAction, type AlertDialogActionProps } 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<
|
|
|
|
|
AlertDialogActionProps & { class?: HTMLAttributes["class"] }
|
|
|
|
|
>();
|
|
|
|
|
|
|
|
|
|
const delegatedProps = computed(() => {
|
|
|
|
|
const { class: _, ...delegated } = props;
|
|
|
|
|
|
|
|
|
|
return delegated;
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-12-09 22:32:22 +01:00
|
|
|
<AlertDialogAction
|
|
|
|
|
v-bind="delegatedProps"
|
|
|
|
|
:class="cn(buttonVariants(), props.class)"
|
|
|
|
|
>
|
|
|
|
|
<slot/>
|
|
|
|
|
</AlertDialogAction>
|
2024-12-01 17:20:21 +01:00
|
|
|
</template>
|