We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae28f29 commit c629ae6Copy full SHA for c629ae6
src/components/ControllableModal.vue
@@ -0,0 +1,33 @@
1
+<template>
2
+ <ion-modal
3
+ :is-open="modalOpenRef"
4
+ @didDismiss="closeModal()"
5
+ >
6
+ <ion-page>
7
+ <slot></slot>
8
+ </ion-page>
9
+ </ion-modal>
10
+</template>
11
+
12
+<script setup>
13
+// eslint-disable-next-line no-undef
14
+const modalOpenRef = ref(false)
15
16
+function openModal() {
17
+ modalOpenRef.value = true
18
+}
19
20
+function closeModal() {
21
+ modalOpenRef.value = false
22
23
24
25
+defineExpose({
26
+ openModal,
27
+ closeModal
28
+})
29
30
+</script>
31
32
+<style lang="scss" scoped>
33
+</style>
0 commit comments