Add unclosable modals (#70)

This commit is contained in:
Geometrically
2023-06-19 22:15:45 -07:00
committed by GitHub
parent 2bdd0a0e8d
commit 61e00f1620
4 changed files with 17 additions and 5 deletions

View File

@@ -6,13 +6,13 @@
noblur: props.noblur,
}"
class="modal-overlay"
@click="hide"
@click="() => (closable ? hide() : {})"
/>
<div class="modal-container" :class="{ shown: actuallyShown }">
<div class="modal-body">
<div v-if="props.header" class="header">
<h1>{{ props.header }}</h1>
<button class="btn icon-only transparent" @click="hide">
<button v-if="closable" class="btn icon-only transparent" @click="hide">
<XIcon />
</button>
</div>
@@ -38,6 +38,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
closable: {
type: Boolean,
default: true,
},
})
const shown = ref(false)