@@ -36,8 +36,19 @@ import { BehaviorSubject } from "rxjs";
3636@Component ( {
3737 selector : "ibm-pagination" ,
3838 template : `
39- <div class="bx--pagination">
40- <div class="bx--pagination__left">
39+ <div
40+ class="bx--pagination"
41+ [ngClass]="{
42+ 'bx--skeleton' : skeleton
43+ }">
44+
45+ <div *ngIf="skeleton" class="bx--pagination__left">
46+ <p class="bx--skeleton__text" style="width: 70px"></p>
47+ <p class="bx--skeleton__text" style="width: 35px"></p>
48+ <p class="bx--skeleton__text" style="width: 105px"></p>
49+ </div>
50+
51+ <div *ngIf="!skeleton" class="bx--pagination__left">
4152 <span class="bx--pagination__text">{{itemsPerPageText | async}}</span>
4253 <div class="bx--form-item">
4354 <div class="bx--select bx--select--inline">
@@ -76,7 +87,12 @@ import { BehaviorSubject } from "rxjs";
7687 {{totalItemsText | i18nReplace:{start: startItemIndex, end: endItemIndex, total: model.totalDataLength } | async}}
7788 </span>
7889 </div>
79- <div class="bx--pagination__right bx--pagination--inline">
90+
91+ <div *ngIf="skeleton" class="bx--pagination__right bx--pagination--inline">
92+ <p class="bx--skeleton__text" style="width: 70px"></p>
93+ </div>
94+
95+ <div *ngIf="!skeleton" class="bx--pagination__right bx--pagination--inline">
8096 <span class="bx--pagination__text">{{totalPagesText | i18nReplace:{current: currentPage, last: lastPage} | async}}</span>
8197 <button
8298 class="bx--pagination__button bx--pagination__button--backward"
@@ -139,6 +155,10 @@ import { BehaviorSubject } from "rxjs";
139155export class Pagination {
140156 static paginationCounter = 0 ;
141157
158+ /**
159+ * Set to `true` for a loading pagination component.
160+ */
161+ @Input ( ) skeleton = false ;
142162 /**
143163 * `PaginationModel` with the information about pages you're controlling.
144164 *
0 commit comments