summaryrefslogtreecommitdiff
path: root/src/components/Global/InfoTooltip.vue
blob: fc80216e3d7cba7811ccd35a3a8b00e4c60fea1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<template>
  <b-button
    v-b-tooltip
    variant="link"
    class="btn-tooltip btn-icon-only"
    :title="title"
  >
    <icon-tooltip />
    <span class="sr-only">{{ $t('global.ariaLabel.tooltip') }}</span>
  </b-button>
</template>

<script>
import IconTooltip from '@carbon/icons-vue/es/information/16';
import { useI18n } from 'vue-i18n';

export default {
  components: { IconTooltip },
  props: {
    title: {
      type: String,
      default: '',
    },
  },
  data() {
    return {
      $t: useI18n().t,
    };
  },
};
</script>

<style lang="scss" scoped>
.btn-tooltip {
  padding: 0;
  line-height: 1em;
  svg {
    vertical-align: baseline;
  }
}
</style>