summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author_time.vue
blob: c762922d890bff92ea4e80f11925f814f9512c77 (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
<script>
import { GlTooltipDirective } from '@gitlab/ui';
import MrWidgetAuthor from './mr_widget_author.vue';

export default {
  name: 'MrWidgetAuthorTime',
  components: {
    MrWidgetAuthor,
  },
  directives: {
    GlTooltip: GlTooltipDirective,
  },
  props: {
    actionText: {
      type: String,
      required: true,
    },
    author: {
      type: Object,
      required: true,
    },
    dateTitle: {
      type: String,
      required: true,
    },
    dateReadable: {
      type: String,
      required: true,
    },
  },
};
</script>
<template>
  <h4 class="js-mr-widget-author">
    {{ actionText }}
    <mr-widget-author :author="author" />
    <span class="sr-only">{{ dateReadable }} ({{ dateTitle }})</span>
    <time v-gl-tooltip.hover aria-hidden :title="dateTitle"> {{ dateReadable }} </time>
  </h4>
</template>