File tree Expand file tree Collapse file tree 5 files changed +121
-99
lines changed
Expand file tree Collapse file tree 5 files changed +121
-99
lines changed Original file line number Diff line number Diff line change 8585 "@angular/platform-browser-dynamic" : " 14.3.0" ,
8686 "@angular/router" : " 14.3.0" ,
8787 "@babel/core" : " 7.9.6" ,
88- "@carbon/styles" : " 1.56 .0" ,
88+ "@carbon/styles" : " 1.67 .0" ,
8989 "@carbon/themes" : " 11.24.0" ,
9090 "@commitlint/cli" : " 17.0.3" ,
9191 "@commitlint/config-conventional" : " 17.0.3" ,
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ const Template = (args) => ({
2929 [disabled]="disabled"
3030 [totalDataLength]="totalDataLength"
3131 [numOfItemsToShow]="numOfItemsToShow"
32- [skeleton]="skeleton">
32+ [skeleton]="skeleton"
33+ [size]="size">
3334 </app-pagination>
3435 `
3536} ) ;
@@ -38,5 +39,6 @@ Basic.args = {
3839 disabled : false ,
3940 totalDataLength : 10 ,
4041 numOfItemsToShow : 4 ,
41- skeleton : false
42+ skeleton : false ,
43+ size : "md"
4244} ;
Original file line number Diff line number Diff line change 33 Component ,
44 Input ,
55 Output ,
6- EventEmitter
6+ EventEmitter ,
7+ HostBinding
78} from "@angular/core" ;
89
910import { I18n , Overridable } from "carbon-components-angular/i18n" ;
@@ -51,7 +52,7 @@ export interface PaginationNavTranslations {
5152 <li class="cds--pagination-nav__list-item">
5253 <cds-icon-button
5354 kind="ghost"
54- size="md "
55+ [ size]="size "
5556 (click)="jumpToPrevious()"
5657 [disabled]="leftArrowDisabled"
5758 [description]="previousItemText.subject | async">
@@ -95,6 +96,7 @@ export interface PaginationNavTranslations {
9596 <li class="cds--pagination-nav__list-item">
9697 <cds-icon-button
9798 kind="ghost"
99+ [size]="size"
98100 (click)="jumpToNext()"
99101 [disabled]="rightArrowDisabled"
100102 [description]="nextItemText.subject | async">
@@ -141,6 +143,22 @@ export class PaginationNav {
141143 this . previousItemText . override ( valueWithDefaults . PREVIOUS ) ;
142144 }
143145
146+ /**
147+ * Sets the pagination nav size
148+ */
149+ @Input ( ) size : "sm" | "md" | "lg" = "lg" ;
150+
151+ // Size
152+ @HostBinding ( "class.cds--layout--size-sm" ) get smallLayoutSize ( ) {
153+ return this . size === "sm" ;
154+ }
155+ @HostBinding ( "class.cds--layout--size-md" ) get mediumLayoutSize ( ) {
156+ return this . size === "md" ;
157+ }
158+ @HostBinding ( "class.cds--layout--size-lg" ) get largeLayoutSize ( ) {
159+ return this . size === "lg" ;
160+ }
161+
144162 /**
145163 * Emits the new page number.
146164 *
You can’t perform that action at this time.
0 commit comments