From aa2016ce596201b508c92460c52f8a5c8282d1d2 Mon Sep 17 00:00:00 2001 From: upsiflu Date: Thu, 12 Dec 2024 10:41:43 +0100 Subject: [PATCH] feat(ui): make modal closed by default --- front/src/components/ui/Modal.vue | 2 +- front/ui-docs/components/ui/modal.md | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/front/src/components/ui/Modal.vue b/front/src/components/ui/Modal.vue index 2228a4a51..bfb3d59bf 100644 --- a/front/src/components/ui/Modal.vue +++ b/front/src/components/ui/Modal.vue @@ -2,7 +2,7 @@ import Button from '~/components/ui/Button.vue' const { title } = defineProps<{ title:string }>() -const isOpen = defineModel({ required: true }) +const isOpen = defineModel({ default:false }) // TODO: // - [ ] Trap focus while open diff --git a/front/ui-docs/components/ui/modal.md b/front/ui-docs/components/ui/modal.md index 592751fc7..0620fcbaa 100644 --- a/front/ui-docs/components/ui/modal.md +++ b/front/ui-docs/components/ui/modal.md @@ -28,7 +28,7 @@ const isOpen6 = ref(false) | Prop | Data type | Required? | Default | Description | | --------- | ----------------- | --------- | ------- | ---------------------------------- | | `title` | `string` | Yes | | The modal title | -| `v-model` | `true` \| `false` | Yes | | Whether the modal is isOpen or not | +| `v-model` | `true` \| `false` | No | | Whether the modal is isOpen or not | @@ -149,12 +149,12 @@ You will not be able to restore your account. Delete my account ... - Do you want to delete your account forever? You will not be able to restore your account.