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