pingcrm/resources/js/Shared/Pagination.vue

17 lines
658 B
Vue
Raw Normal View History

2019-03-18 08:53:00 -03:00
<template>
<div class="mt-6 -mb-1 flex flex-wrap">
<template v-for="(link, key) in links">
2019-05-22 12:39:26 -03:00
<div v-if="link.url === null" :key="key" class="mr-1 mb-1 px-4 py-3 text-sm border rounded text-gray-400" :class="{ 'ml-auto': link.label === 'Next' }">{{ link.label }}</div>
<inertia-link v-else :key="key" class="mr-1 mb-1 px-4 py-3 text-sm border rounded hover:bg-white focus:border-indigo-500 focus:text-indigo-500" :class="{ 'bg-white': link.active, 'ml-auto': link.label === 'Next' }" :href="link.url">{{ link.label }}</inertia-link>
2019-03-18 08:53:00 -03:00
</template>
</div>
</template>
<script>
export default {
props: {
links: Array,
},
}
</script>