feat(ui): make modal closed by default
This commit is contained in:
parent
48a86d1515
commit
aa2016ce59
|
@ -2,7 +2,7 @@
|
||||||
import Button from '~/components/ui/Button.vue'
|
import Button from '~/components/ui/Button.vue'
|
||||||
|
|
||||||
const { title } = defineProps<{ title:string }>()
|
const { title } = defineProps<{ title:string }>()
|
||||||
const isOpen = defineModel<boolean>({ required: true })
|
const isOpen = defineModel<boolean>({ default:false })
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// - [ ] Trap focus while open
|
// - [ ] Trap focus while open
|
||||||
|
|
|
@ -28,7 +28,7 @@ const isOpen6 = ref(false)
|
||||||
| Prop | Data type | Required? | Default | Description |
|
| Prop | Data type | Required? | Default | Description |
|
||||||
| --------- | ----------------- | --------- | ------- | ---------------------------------- |
|
| --------- | ----------------- | --------- | ------- | ---------------------------------- |
|
||||||
| `title` | `string` | Yes | | The modal title |
|
| `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>
|
<Layout flex>
|
||||||
|
|
||||||
|
@ -149,12 +149,12 @@ You will not be able to restore your account.
|
||||||
Delete my account ...
|
Delete my account ...
|
||||||
</Button>
|
</Button>
|
||||||
<Modal v-model="isOpen6" title="Delete account?">
|
<Modal v-model="isOpen6" title="Delete account?">
|
||||||
<template #alert>
|
<template #alert>
|
||||||
<Alert color="red">
|
<Alert color="red">
|
||||||
1 082 music files that you uploaded will be deleted.<br />
|
1 082 music files that you uploaded will be deleted.<br />
|
||||||
7 879 items in your collections will be unlinked.
|
7 879 items in your collections will be unlinked.
|
||||||
</Alert>
|
</Alert>
|
||||||
</template>
|
</template>
|
||||||
Do you want to delete your account forever?
|
Do you want to delete your account forever?
|
||||||
|
|
||||||
You will not be able to restore your account.
|
You will not be able to restore your account.
|
||||||
|
|
Loading…
Reference in New Issue