closeable prop

This commit is contained in:
Freeplay 2023-05-29 14:55:00 -04:00
parent 7527351620
commit 4bead341a1
2 changed files with 3 additions and 2 deletions

View file

@ -3,7 +3,7 @@
<i v-if="warn" class="ph-warning ph-bold ph-lg"></i>
<i v-else class="ph-bold ph-lg" :class="icon ? `ph-${icon}` : 'ph-info'"></i>
<slot></slot>
<button class="_button close" @click.stop="close">
<button v-if="closeable" class="_button close" @click.stop="close">
<i class="ph-x ph-bold ph-lg"></i>
</button>
</div>
@ -18,6 +18,7 @@ defineProps<{
icon?: string;
warn?: boolean;
card?: boolean;
closeable?: boolean;
}>();
const emit = defineEmits<{

View file

@ -1,5 +1,5 @@
<template>
<MkInfo v-if="tlHint && !tlHintClosed" class="_gap" @close="closeHint">
<MkInfo v-if="tlHint && !tlHintClosed" :closeable="true" class="_gap" @close="closeHint">
<I18n
:src="tlHint"
>