fix: ExplainWhat popover

This commit is contained in:
axolotle 2024-03-19 01:15:49 +01:00
parent cb7b13f112
commit cc02444e33

View file

@ -2,16 +2,21 @@
<span class="explain-what"> <span class="explain-what">
<slot name="default" /> <slot name="default" />
<span class="explain-what-popover-container"> <span class="explain-what-popover-container">
<BButton :id="id" href="#" variant="light"> <BButton
variant="light"
@focus="open = true"
@blur="open = false"
@click="open = !open"
>
<YIcon iname="question" /> <YIcon iname="question" />
<span class="sr-only"> <span class="sr-only">
{{ $t('details_about', { subject: title }) }} {{ $t('details_about', { subject: title }) }}
</span> </span>
</BButton> </BButton>
<!-- FIXME missing prop `trigger` in bvn https://github.com/bootstrap-vue-next/bootstrap-vue-next/issues/1275 and looks like `placement` doesn't work -->
<BPopover <BPopover
placement="auto" v-model="open"
:target="id" placement="top"
triggers="focus"
custom-class="explain-what-popover" custom-class="explain-what-popover"
:variant="variant" :variant="variant"
:title="title" :title="title"
@ -38,6 +43,12 @@ export default {
return Object.assign({ md: 4, xl: 3 }, this.cols) return Object.assign({ md: 4, xl: 3 }, this.cols)
}, },
}, },
data() {
return {
open: false,
}
},
} }
</script> </script>