summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vue_shared/components/rich_content_editor/toolbar_item.vue
blob: 4271f6053edbf13dce353ec5120e4f8066dbac70 (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
<script>
import { GlIcon, GlTooltipDirective } from '@gitlab/ui';

export default {
  components: {
    GlIcon,
  },
  directives: {
    GlTooltip: GlTooltipDirective,
  },
  props: {
    icon: {
      type: String,
      required: true,
    },
    tooltip: {
      type: String,
      required: true,
    },
  },
};
</script>
<template>
  <button v-gl-tooltip="{ title: tooltip }" class="p-0 gl-display-flex toolbar-button">
    <gl-icon class="gl-mx-auto gl-align-self-center" :name="icon" />
  </button>
</template>