feat(Modal): open programmatically (#78)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Neil Richter
2024-05-28 17:14:13 +02:00
committed by GitHub
parent cf38e7ed78
commit 2bf99e1eb4
8 changed files with 146 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
<script lang="ts" setup>
const modal = useModal()
defineProps<{
count: number
}>()
</script>
<template>
<UModal title="This modal was opened programmatically">
<template #footer>
<div class="flex w-full justify-between">
<p>Count: {{ count }}</p>
<UButton color="gray" label="Close" @click="modal.close()" />
</div>
</template>
</UModal>
</template>