feat(ui): make modal closed by default

This commit is contained in:
upsiflu 2024-12-12 10:41:43 +01:00
parent 48a86d1515
commit aa2016ce59
2 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@
import Button from '~/components/ui/Button.vue'
const { title } = defineProps<{ title:string }>()
const isOpen = defineModel<boolean>({ required: true })
const isOpen = defineModel<boolean>({ default:false })
// TODO:
// - [ ] Trap focus while open

View File

@ -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 |
<Layout flex>
@ -149,12 +149,12 @@ You will not be able to restore your account.
Delete my account ...
</Button>
<Modal v-model="isOpen6" title="Delete account?">
<template #alert>
<Alert color="red">
<template #alert>
<Alert color="red">
1 082 music files that you uploaded will be deleted.<br />
7 879 items in your collections will be unlinked.
</Alert>
</template>
</Alert>
</template>
Do you want to delete your account forever?
You will not be able to restore your account.