Skip to content

Commit

Permalink
feat: add BasePagination demos with different rounded styles
Browse files Browse the repository at this point in the history
  • Loading branch information
driss-chelouati committed Dec 18, 2023
1 parent 829d89b commit b43cc31
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions .playground/pages/tests/base/pagination.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<script setup lang="ts">
definePageMeta({
title: 'BasePagination',
icon: 'system-uicons:circle-menu',
description: 'Pagination component',
section: 'base',
})
const route = useRoute()
const currentPage = computed(() => {
try {
return Number.parseInt(route.query.page as string) || 1
} catch {}
return 1
})
</script>

<template>
<div>
<NuiPreviewContainer title="BasePagination">
<NuiPreview
title="Rounded: none"
description="Pagination component radius none"
>
<BasePagination
:item-per-page="8"
:total-items="512"
:current-page="currentPage"
:max-links-displayed="5"
rounded="none"
/>
</NuiPreview>

<NuiPreview
title="Rounded: sm"
description="Pagination component radius sm"
>
<BasePagination
:item-per-page="8"
:total-items="512"
:current-page="currentPage"
:max-links-displayed="5"
rounded="sm"
/>
</NuiPreview>

<NuiPreview
title="Rounded: md"
description="Pagination component radius md"
>
<BasePagination
:item-per-page="8"
:total-items="512"
:current-page="currentPage"
:max-links-displayed="5"
rounded="md"
/>
</NuiPreview>

<NuiPreview
title="Rounded: lg"
description="Pagination component radius lg"
>
<BasePagination
:item-per-page="8"
:total-items="512"
:current-page="currentPage"
:max-links-displayed="5"
rounded="lg"
/>
</NuiPreview>

<NuiPreview
title="Rounded: full"
description="Pagination component radius full"
>
<BasePagination
:item-per-page="8"
:total-items="512"
:current-page="currentPage"
:max-links-displayed="5"
rounded="full"
/>
</NuiPreview>
</NuiPreviewContainer>
</div>
</template>

0 comments on commit b43cc31

Please sign in to comment.