mirror of
https://github.com/keven1024/015.git
synced 2026-06-06 04:19:35 +00:00
26 lines
676 B
Vue
26 lines
676 B
Vue
<script setup lang="ts">
|
|
import type { HTMLAttributes } from 'vue'
|
|
import { DialogClose } from 'reka-ui'
|
|
import { cn } from '@/lib/utils'
|
|
import { Button } from '@/components/ui/button'
|
|
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
class?: HTMLAttributes['class']
|
|
showCloseButton?: boolean
|
|
}>(),
|
|
{
|
|
showCloseButton: false,
|
|
}
|
|
)
|
|
</script>
|
|
|
|
<template>
|
|
<div data-slot="dialog-footer" :class="cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', props.class)">
|
|
<slot />
|
|
<DialogClose v-if="showCloseButton" as-child>
|
|
<Button variant="outline"> Close </Button>
|
|
</DialogClose>
|
|
</div>
|
|
</template>
|