committed by
GitHub
6 changed files with 15 additions and 39 deletions
@ -1,27 +1,13 @@ |
|||
<script setup lang="ts"> |
|||
import type { AlertDialogActionProps } from 'reka-ui'; |
|||
|
|||
import type { HTMLAttributes } from 'vue'; |
|||
|
|||
import { cn } from '@vben-core/shared/utils'; |
|||
|
|||
import { reactiveOmit } from '@vueuse/core'; |
|||
import { AlertDialogAction } from 'reka-ui'; |
|||
|
|||
import { buttonVariants } from '../button'; |
|||
|
|||
const props = defineProps< |
|||
AlertDialogActionProps & { class?: HTMLAttributes['class'] } |
|||
>(); |
|||
|
|||
const delegatedProps = reactiveOmit(props, 'class'); |
|||
const props = defineProps<AlertDialogActionProps>(); |
|||
</script> |
|||
|
|||
<template> |
|||
<AlertDialogAction |
|||
v-bind="delegatedProps" |
|||
:class="cn(buttonVariants(), props.class)" |
|||
> |
|||
<AlertDialogAction v-bind="props"> |
|||
<slot></slot> |
|||
</AlertDialogAction> |
|||
</template> |
|||
|
|||
@ -1,29 +1,13 @@ |
|||
<script setup lang="ts"> |
|||
import type { AlertDialogCancelProps } from 'reka-ui'; |
|||
|
|||
import type { HTMLAttributes } from 'vue'; |
|||
|
|||
import { cn } from '@vben-core/shared/utils'; |
|||
|
|||
import { reactiveOmit } from '@vueuse/core'; |
|||
import { AlertDialogCancel } from 'reka-ui'; |
|||
|
|||
import { buttonVariants } from '../button'; |
|||
|
|||
const props = defineProps< |
|||
AlertDialogCancelProps & { class?: HTMLAttributes['class'] } |
|||
>(); |
|||
|
|||
const delegatedProps = reactiveOmit(props, 'class'); |
|||
const props = defineProps<AlertDialogCancelProps>(); |
|||
</script> |
|||
|
|||
<template> |
|||
<AlertDialogCancel |
|||
v-bind="delegatedProps" |
|||
:class=" |
|||
cn(buttonVariants({ variant: 'outline' }), 'mt-2 sm:mt-0', props.class) |
|||
" |
|||
> |
|||
<AlertDialogCancel v-bind="props"> |
|||
<slot></slot> |
|||
</AlertDialogCancel> |
|||
</template> |
|||
|
|||
Loading…
Reference in new issue