<template>
  <span
    :title="title"
    class="m-pagination-trigger"
    @click="onClick">
    {{ pageNumber }}
  </span>
</template>

<script>
export default {
  props: {
    pageNumber: {
      type: Number,
      required: true,
    },
    title: {
      type: String,
      required: true,
    },
  },

  methods: {
    onClick() {
      this.$emit('loadPage', this.pageNumber);
    },
  },
};
</script>

<style lang="scss" scoped>
.m-pagination-trigger {
  cursor: pointer;
}
</style>
