File tree Expand file tree Collapse file tree 4 files changed +59
-8
lines changed
projects/igniteui-angular/src/lib/core/styles/components/list Expand file tree Collapse file tree 4 files changed +59
-8
lines changed Original file line number Diff line number Diff line change 425425 justify-content : center ;
426426 border-radius : var-get ($theme , ' item-border-radius' );
427427 color : var-get ($theme , ' item-text-color' );
428- background : var-get ($theme , ' item-background' );
429428
430429 @if $bootstrap-theme or $variant == ' fluent' {
431430 border-bottom : var-get ($theme , ' border-width' ) solid var-get ($theme , ' border-color' );
436435 }
437436
438437 & :hover {
439- color : var-get ($theme , ' item-text-color-hover' );
440- background : var-get ($theme , ' item-background-hover' );
441-
442438 %igx-list__item-lines {
443439 color : currentColor ;
444440 }
544540 align-items : center ;
545541 position : relative ;
546542 border-radius : var-get ($theme , ' item-border-radius' );
547- background : inherit ;
543+ background : var-get ( $theme , ' item-background ' ) ;
548544 z-index : 2 ;
549545 gap : if ($variant == ' indigo' , rem (8px ), rem (16px ));
546+
547+ & :hover ,
548+ & :focus-within {
549+ color : var-get ($theme , ' item-text-color-hover' );
550+ background : var-get ($theme , ' item-background-hover' );
551+ }
550552 }
551553
552554 %igx-list-header ,
Original file line number Diff line number Diff line change 22 < section class ="sample-content " [igSize] ="properties.size ">
33 < article class ="sample-column ">
44 < h5 class ="sample-title "> Angular List</ h5 >
5- < igx-list >
5+ < igx-list [allowLeftPanning] ="properties.enablePanning " [allowRightPanning] ="properties.enablePanning ">
6+ < ng-template igxListItemLeftPanning >
7+ < div class ="pan pan--left ">
8+ < igx-icon > delete</ igx-icon > Delete
9+ </ div >
10+ </ ng-template >
11+ < ng-template igxListItemRightPanning >
12+ < div class ="pan pan--right ">
13+ < igx-icon > call</ igx-icon > Dial
14+ </ div >
15+ </ ng-template >
616 < igx-list-item [isHeader] ="true " selected > Employees List</ igx-list-item >
717 @for (employee of employeeItems; track employee) {
818 < igx-list-item [selected] ="employee.selected ">
Original file line number Diff line number Diff line change 11.sample-title {
22 text-align : center ;
33}
4+
5+ .pan {
6+ display : flex ;
7+ color : white ;
8+ width : 100% ;
9+ padding-left : 10px ;
10+ align-items : center ;
11+ }
12+
13+ .pan--left {
14+ flex-direction : row-reverse ;
15+ background-color :orange ;
16+ }
17+
18+ .pan--right {
19+ flex-direction : row ;
20+ background-color :limegreen ;
21+ }
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ import {
3030 PropertyChangeService ,
3131 PropertyPanelConfig ,
3232} from '../properties-panel/property-change.service' ;
33+ import { HAMMER_GESTURE_CONFIG , HammerModule } from '@angular/platform-browser' ;
34+ import Hammer from 'hammerjs' ;
3335
3436defineComponents (
3537 IgcListComponent ,
@@ -79,15 +81,27 @@ interface Employee {
7981 IgxAvatarComponent ,
8082 IgxButtonModule ,
8183 IgxButtonDirective ,
82- IgSizeDirective
84+ IgSizeDirective ,
85+ HammerModule
86+ ] ,
87+ providers : [
88+ {
89+ provide : HAMMER_GESTURE_CONFIG ,
90+ useClass : class {
91+ public overrides = {
92+ pan : { direction : Hammer . DIRECTION_HORIZONTAL }
93+ }
94+ }
95+ }
8396 ]
8497} )
8598export class ListSampleComponent {
8699 public panelConfig : PropertyPanelConfig = {
87100 size : {
88101 control : {
89102 type : 'button-group' ,
90- options : [ 'small' , 'medium' , 'large' ]
103+ options : [ 'small' , 'medium' , 'large' ] ,
104+ defaultValue : 'medium'
91105 }
92106 } ,
93107 hideTitle : {
@@ -145,6 +159,13 @@ export class ListSampleComponent {
145159 type : 'boolean' ,
146160 defaultValue : false
147161 }
162+ } ,
163+ enablePanning : {
164+ label : 'Item Panning' ,
165+ control : {
166+ type : 'boolean' ,
167+ defaultValue : false
168+ }
148169 }
149170 }
150171
You can’t perform that action at this time.
0 commit comments