Skip to content
This repository was archived by the owner on Dec 2, 2025. It is now read-only.

Commit 5adc310

Browse files
Ericlmzernonia
andauthored
feat: add open prop slot on AlertDialog (unovue#1671)
* feat: add open prop slot on AlertDialog * fix: using open from DialogRoot * feat: expose slotProps from dialogroot --------- Co-authored-by: zernonia <zernonia@gmail.com>
1 parent 6331882 commit 5adc310

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/content/meta/AlertDialogRoot.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@
2222
'type': '[value: boolean]'
2323
}
2424
]" />
25+
26+
<SlotsTable :data="[
27+
{
28+
'name': 'open',
29+
'description': '<p>Current open state</p>\n',
30+
'type': 'boolean'
31+
}
32+
]" />

packages/core/src/AlertDialog/AlertDialogRoot.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,10 @@ useForwardExpose()
2121

2222
<template>
2323
<DialogRoot
24+
v-slot="slotProps"
2425
v-bind="forwarded"
2526
:modal="true"
2627
>
27-
<slot />
28+
<slot v-bind="slotProps" />
2829
</DialogRoot>
2930
</template>

0 commit comments

Comments
 (0)