xref: /openbmc/webui-vue/src/components/Global/InfoTooltip.vue (revision d36ac8a8be8636ddd0e64ce005d507b21bcdeb00)
1<template>
2  <b-button
3    v-b-tooltip
4    variant="link"
5    class="btn-tooltip btn-icon-only"
6    :title="title"
7  >
8    <icon-tooltip />
9    <span class="visually-hidden-focusable">
10      {{ $t('global.ariaLabel.tooltip') }}
11    </span>
12  </b-button>
13</template>
14
15<script>
16import IconTooltip from '@carbon/icons-vue/es/information/16';
17import { useI18n } from 'vue-i18n';
18
19export default {
20  components: { IconTooltip },
21  props: {
22    title: {
23      type: String,
24      default: '',
25    },
26  },
27  data() {
28    return {
29      $t: useI18n().t,
30    };
31  },
32};
33</script>
34
35<style lang="scss" scoped>
36.btn-tooltip {
37  padding: 0;
38  line-height: 1em;
39  svg {
40    vertical-align: baseline;
41  }
42}
43</style>
44