Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/core/useConfirmDialog/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { useConfirmDialog } from '@vueuse/core'
import { shallowRef } from 'vue'

const message = shallowRef('')
const revaled1 = shallowRef(false)
const revaled2 = shallowRef(false)
const revealed1 = shallowRef(false)
const revealed2 = shallowRef(false)

const dialog1 = useConfirmDialog(revaled1)
const dialog2 = useConfirmDialog(revaled2)
const dialog1 = useConfirmDialog(revealed1)
const dialog2 = useConfirmDialog(revealed2)

dialog1.onReveal(() => {
message.value = 'Modal is shown!'
Expand Down Expand Up @@ -42,14 +42,14 @@ dialog2.onCancel(() => {
<span class="text-orange-400">{{ message }}</span>
</h2>
<button
:disabled="revaled1 || revaled2"
:disabled="revealed1 || revealed2"
@click="dialog1.reveal"
>
Click to Show Modal Dialog
</button>

<!-- First Dialog -->
<div v-if="revaled1">
<div v-if="revealed1">
<div>
<div>
<p>Show Second Dialog?</p>
Expand All @@ -66,7 +66,7 @@ dialog2.onCancel(() => {
</div>

<!-- Second Dialog -->
<div v-if="revaled2">
<div v-if="revealed2">
<div>
<div>
<p>Confirm or Reject</p>
Expand Down