Skip to content

Commit e017168

Browse files
committed
refactor: changed prop naming in CPagination
1 parent 1d4c202 commit e017168

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

src/components/Pagination/CPagination.vue

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<template>
2-
<ul :class="computedClasses" role="menubar" aria-disabled="false" aria-label="pagination">
3-
<li v-if="!noDoubleArrows"
2+
<ul :class="computedClasses"
3+
role="menubar"
4+
aria-disabled="false"
5+
aria-label="pagination"
6+
>
7+
<li v-if="!hideDoubleArrows"
48
:class="firstClasses"
59
>
610
<CLink class="page-link"
@@ -11,7 +15,7 @@
1115
<span v-html="firstButtonText"></span>
1216
</CLink>
1317
</li>
14-
<li v-if="!noArrows"
18+
<li v-if="!hideArrows"
1519
:class="firstClasses"
1620
>
1721
<CLink class="page-link"
@@ -47,7 +51,7 @@
4751
>
4852
<span class="page-link">…</span>
4953
</li>
50-
<li v-if="!noArrows"
54+
<li v-if="!hideArrows"
5155
:class="lastClasses"
5256
>
5357
<CLink class="page-link"
@@ -58,7 +62,7 @@
5862
<span v-html="nextButtonText"></span>
5963
</CLink>
6064
</li>
61-
<li v-if="!noDoubleArrows"
65+
<li v-if="!hideDoubleArrows"
6266
:class="lastClasses"
6367
>
6468
<CLink class="page-link"
@@ -109,7 +113,7 @@
109113
return `pagination b-pagination pagination-${this.rwd} justify-content-${this.align} `
110114
},
111115
dots () {
112-
return this.noDots || this.limit < 4 ? false : true
116+
return this.hideDots || this.limit < 5 ? false : true
113117
},
114118
items () {
115119
let maxPrevItems = Math.floor((this.limit - 1) / 2)
@@ -191,19 +195,21 @@
191195
},
192196
size: {
193197
type: String,
194-
default: 'md'
198+
default: 'md',
199+
validator: val => ['sm', 'md', 'lg'].includes(val)
195200
},
196201
align: {
197202
type: String,
198-
default: 'start'
203+
default: 'start',
204+
validator: val => ['start', 'center', 'end'].includes(val)
199205
},
200206
limit: {
201207
type: Number,
202208
default: 5
203209
},
204-
noDots: Boolean,
205-
noArrows: Boolean,
206-
noDoubleArrows: Boolean,
210+
hideDots: Boolean,
211+
hideArrows: Boolean,
212+
hideDoubleArrows: Boolean,
207213
firstButtonText: {
208214
type: String,
209215
default: '&laquo;'

0 commit comments

Comments
 (0)