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' 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

View File

@ -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>