forked from bootstrap-vue-next/bootstrap-vue-next
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(BPagination): Update Component refs & clean up documentation (bo…
- Loading branch information
Showing
10 changed files
with
260 additions
and
396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
apps/docs/src/docs/components/demo/PaginationAlignment.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<div> | ||
<h6>Left alignment (default)</h6> | ||
<BPagination v-model="currentPage" :total-rows="rows" /> | ||
</div> | ||
<div class="mt-3"> | ||
<h6 class="text-center">Center alignment</h6> | ||
<BPagination v-model="currentPage" :total-rows="rows" align="center" /> | ||
</div> | ||
<div class="mt-3"> | ||
<h6 class="text-end">Right (end) alignment</h6> | ||
<BPagination v-model="currentPage" :total-rows="rows" align="end" /> | ||
</div> | ||
<div class="mt-3"> | ||
<h6 class="text-center">Fill alignment</h6> | ||
<BPagination v-model="currentPage" :total-rows="rows" align="fill" /> | ||
</div> | ||
</template> | ||
<script setup lang="ts"> | ||
import {ref} from 'vue' | ||
const currentPage = ref(1) | ||
const rows = ref(100) | ||
</script> |
50 changes: 50 additions & 0 deletions
50
apps/docs/src/docs/components/demo/PaginationButtonContent.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<template> | ||
<!-- Use text in props --> | ||
<BPagination | ||
v-model="currentPage" | ||
:total-rows="rows" | ||
:per-page="perPage" | ||
first-text="First" | ||
prev-text="Prev" | ||
next-text="Next" | ||
last-text="Last" | ||
/> | ||
|
||
<!-- Use emojis in props --> | ||
<BPagination | ||
v-model="currentPage" | ||
:total-rows="rows" | ||
:per-page="perPage" | ||
first-text="⏮" | ||
prev-text="⏪" | ||
next-text="⏩" | ||
last-text="⏭" | ||
class="mt-4" | ||
/> | ||
|
||
<!-- Use HTML and sub-components in slots --> | ||
<BPagination v-model="currentPage" :total-rows="rows" :per-page="perPage" class="mt-4"> | ||
<template #first-text><span class="text-success">First</span></template> | ||
<template #prev-text><span class="text-danger">Prev</span></template> | ||
<template #next-text><span class="text-warning">Next</span></template> | ||
<template #last-text><span class="text-info">Last</span></template> | ||
<template #ellipsis-text> | ||
<BSpinner small type="grow" /> | ||
<BSpinner small type="grow" /> | ||
<BSpinner small type="grow" /> | ||
</template> | ||
<template #page="{page, active}"> | ||
<b v-if="active">{{ page }}</b> | ||
<i v-else>{{ page }}</i> | ||
</template> | ||
</BPagination> | ||
Current page : {{ currentPage }} | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import {ref} from 'vue' | ||
const currentPage = ref(1) | ||
const perPage = ref(10) | ||
const rows = ref(100) | ||
</script> |
17 changes: 17 additions & 0 deletions
17
apps/docs/src/docs/components/demo/PaginationButtonSize.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<h6>Small</h6> | ||
<BPagination v-model="currentPage" :total-rows="rows" size="sm" /> | ||
|
||
<h6>Default</h6> | ||
<BPagination v-model="currentPage" :total-rows="rows" /> | ||
|
||
<h6>Large</h6> | ||
<BPagination v-model="currentPage" :total-rows="rows" size="lg" /> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import {ref} from 'vue' | ||
const currentPage = ref(1) | ||
const rows = ref(100) | ||
</script> |
24 changes: 24 additions & 0 deletions
24
apps/docs/src/docs/components/demo/PaginationFirstLast.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<template> | ||
<h6>Goto first button number</h6> | ||
<BPagination v-model="currentPage" :total-rows="rows" :per-page="perPage" first-number /> | ||
|
||
<h6>Goto last button number</h6> | ||
<BPagination v-model="currentPage" :total-rows="rows" :per-page="perPage" last-number /> | ||
|
||
<h6>Goto first and last button number</h6> | ||
<BPagination | ||
v-model="currentPage" | ||
:total-rows="rows" | ||
:per-page="perPage" | ||
first-number | ||
last-number | ||
/> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import {ref} from 'vue' | ||
const currentPage = ref(5) | ||
const perPage = ref(1) | ||
const rows = ref(100) | ||
</script> |
Oops, something went wrong.