pelican-jdr/src/components/tableaux/pagination/PageButton.vue
2023-02-14 20:33:30 +01:00

22 lines
395 B
Vue

<script setup lang="ts">
import { computed } from "vue";
const props = defineProps<{
page: number;
currentPage: number;
}>();
const isPage = computed(() => {
return props.page === props.currentPage;
});
</script>
<template>
<button
class="btn-small"
:class="{ 'btn-secondary': !isPage, 'bg-primary': isPage }"
:disabled="isPage"
>
{{ page }}
</button>
</template>