@@ -126,6 +126,37 @@ export class UUIPaginationElement extends LitElement {
126
126
@property ( { reflect : true , attribute : 'aria-label' } )
127
127
ariaLabel = '' ;
128
128
129
+ /**
130
+ * This property is used to generate the name of the first button
131
+ * @type {string }
132
+ * @attr
133
+ */
134
+ @property ( )
135
+ firstLabel : string = 'First' ;
136
+
137
+ /**
138
+ * This property is used to generate the name of the previous button
139
+ * @type {string }
140
+ * @attr
141
+ */
142
+ @property ( )
143
+ previousLabel : string = 'Previous' ;
144
+
145
+ /**
146
+ * This property is used to generate the name of the next button
147
+ * @type {string }
148
+ * @attr
149
+ */
150
+ @property ( )
151
+ nextLabel : string = 'Next' ;
152
+ /**
153
+ * This property is used to generate the name of the last button
154
+ * @type {string }
155
+ * @attr
156
+ */
157
+ @property ( )
158
+ lastLabel : string = 'Last' ;
159
+
129
160
private _total = 100 ;
130
161
131
162
/**
@@ -214,11 +245,9 @@ export class UUIPaginationElement extends LitElement {
214
245
look= "outline"
215
246
class = "nav"
216
247
role = "listitem"
217
- label = "Go to first page"
248
+ label = ${ this . firstLabel }
218
249
?dis abled= ${ this . _current === 1 }
219
- @click = ${ ( ) => this . goToPage ( 1 ) } >
220
- First
221
- </ uui- butto n> ` ;
250
+ @click = ${ ( ) => this . goToPage ( 1 ) } > </ uui- butto n> ` ;
222
251
}
223
252
224
253
protected renderPrevious ( ) {
@@ -227,11 +256,9 @@ export class UUIPaginationElement extends LitElement {
227
256
look= "outline"
228
257
class = "nav"
229
258
role = "listitem"
230
- label = "Go to previous page"
259
+ label = ${ this . previousLabel }
231
260
?dis abled= ${ this . _current === 1 }
232
- @click = ${ this . goToPreviousPage } >
233
- Previous
234
- </ uui- butto n> ` ;
261
+ @click = ${ this . goToPreviousPage } > </ uui- butto n> ` ;
235
262
}
236
263
237
264
protected renderNext ( ) {
@@ -240,11 +267,9 @@ export class UUIPaginationElement extends LitElement {
240
267
look= "outline"
241
268
role = "listitem"
242
269
class = "nav"
243
- label = "Go to next page"
270
+ label = ${ this . nextLabel }
244
271
?dis abled= ${ this . _current === this . total }
245
- @click = ${ this . goToNextPage } >
246
- Next
247
- </ uui- butto n> ` ;
272
+ @click = ${ this . goToNextPage } > </ uui- butto n> ` ;
248
273
}
249
274
250
275
protected renderLast ( ) {
@@ -254,11 +279,9 @@ export class UUIPaginationElement extends LitElement {
254
279
look= "outline"
255
280
role = "listitem"
256
281
class = "nav"
257
- label = "Go to last page"
282
+ label = ${ this . lastLabel }
258
283
?dis abled= ${ this . total === this . _current }
259
- @click = ${ ( ) => this . goToPage ( this . total ) } >
260
- Last
261
- </ uui- butto n>
284
+ @click = ${ ( ) => this . goToPage ( this . total ) } > </ uui- butto n>
262
285
` ;
263
286
}
264
287
0 commit comments