22 lines
395 B
Vue
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>
|