summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vue_shared/components/pagination_links.vue
blob: 1f2a679c14555b7c311b0a75a12984e7ebd160fd (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
<script>
import { s__ } from '../../locale';

export default {
  props: {
    change: {
      type: Function,
      required: true,
    },
    pageInfo: {
      type: Object,
      required: true,
    },
  },
  firstText: s__('Pagination|« First'),
  prevText: s__('Pagination|Prev'),
  nextText: s__('Pagination|Next'),
  lastText: s__('Pagination|Last »'),
};
</script>

<template>
  <gl-pagination
    v-bind="$attrs"
    :change="change"
    :page="pageInfo.page"
    :per-page="pageInfo.perPage"
    :total-items="pageInfo.total"
    :first-text="$options.firstText"
    :prev-text="$options.prevText"
    :next-text="$options.nextText"
    :last-text="$options.lastText"
  />
</template>