Skip to content

Commit

Permalink
feat: add open prop slot on AlertDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericlm committed Mar 1, 2025
1 parent d5fbe40 commit 0fa4446
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/core/src/AlertDialog/AlertDialogRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ import { useForwardExpose, useForwardPropsEmits } from '@/shared'
const props = defineProps<AlertDialogProps>()
const emits = defineEmits<AlertDialogEmits>()
defineSlots<{
default: (props: {
/** Current open state */
open: typeof forwarded.value.open
}) => any
}>()
const forwarded = useForwardPropsEmits(props, emits)
useForwardExpose()
</script>
Expand All @@ -24,6 +30,6 @@ useForwardExpose()
v-bind="forwarded"
:modal="true"
>
<slot />
<slot :open="forwarded.open" />
</DialogRoot>
</template>

0 comments on commit 0fa4446

Please sign in to comment.