feat: added icons and custom text
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
import PaginationExample from './pagination/examples/PaginationExample.vue';
|
import PaginationExample from './pagination/examples/PaginationExample.vue';
|
||||||
import PaginationNavigationExample from './pagination/examples/PaginationNavigationExample.vue';
|
import PaginationNavigationExample from './pagination/examples/PaginationNavigationExample.vue';
|
||||||
import PaginationTableExample from './pagination/examples/PaginationTableExample.vue';
|
import PaginationTableExample from './pagination/examples/PaginationTableExample.vue';
|
||||||
|
import PaginationWithIconsExample from './pagination/examples/PaginationWithIconsExample.vue';
|
||||||
|
import PaginationWithCustomTextExample from './pagination/examples/PaginationWithCustomTextExample.vue';
|
||||||
</script>
|
</script>
|
||||||
# Vue Pagination Component - Flowbite
|
# Vue Pagination Component - Flowbite
|
||||||
|
|
||||||
@@ -42,4 +44,28 @@ import { Pagination } from 'flowbite-vue'
|
|||||||
</template>
|
</template>
|
||||||
```
|
```
|
||||||
|
|
||||||
<PaginationTableExample />
|
<PaginationWithIconsExample />
|
||||||
|
|
||||||
|
## Pagination with icons
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<script setup>
|
||||||
|
import { Pagination } from 'flowbite-vue'
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<Pagination></Pagination>
|
||||||
|
</template>
|
||||||
|
```
|
||||||
|
|
||||||
|
<PaginationWithCustomTextExample />
|
||||||
|
|
||||||
|
## Pagination with custom labels
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<script setup>
|
||||||
|
import { Pagination } from 'flowbite-vue'
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<Pagination></Pagination>
|
||||||
|
</template>
|
||||||
|
```
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<template>
|
||||||
|
<div class="vp-raw flex flex-col">
|
||||||
|
<Pagination v-model="currentPage" :total-pages="100" previous-label="<<<" next-label=">>>"></Pagination>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { Pagination } from '../../../../src/index'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
const currentPage = ref<number>(1)
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<template>
|
||||||
|
<div class="vp-raw flex flex-col">
|
||||||
|
<Pagination v-model="currentPage" :total-pages="100" show-icons></Pagination>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { Pagination } from '../../../../src/index'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
const currentPage = ref<number>(1)
|
||||||
|
</script>
|
||||||
@@ -13,8 +13,9 @@
|
|||||||
<button
|
<button
|
||||||
:disabled="isDecreaseDisabled"
|
:disabled="isDecreaseDisabled"
|
||||||
@click="decreasePage"
|
@click="decreasePage"
|
||||||
class="py-2 px-3 ml-0 leading-tight text-gray-500 bg-white rounded-l-lg border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
|
class="flex items-center py-2 px-3 ml-0 leading-tight text-gray-500 bg-white rounded-l-lg border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
|
||||||
>
|
>
|
||||||
|
<svg v-if="showIcons" stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 20 20" aria-hidden="true" class="h-5 w-5" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd"></path></svg>
|
||||||
{{ previousLabel }}
|
{{ previousLabel }}
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
@@ -35,9 +36,10 @@
|
|||||||
<button
|
<button
|
||||||
:disabled="isIncreaseDisabled"
|
:disabled="isIncreaseDisabled"
|
||||||
@click="increasePage"
|
@click="increasePage"
|
||||||
class="py-2 px-3 leading-tight text-gray-500 bg-white rounded-r-lg border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
|
class="flex items-center py-2 px-3 leading-tight text-gray-500 bg-white rounded-r-lg border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white"
|
||||||
>
|
>
|
||||||
{{ nextLabel }}
|
{{ nextLabel }}
|
||||||
|
<svg v-if="showIcons" stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 20 20" aria-hidden="true" class="h-5 w-5" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"></path></svg>
|
||||||
</button>
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user