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 425
425
justify-content : center ;
426
426
border-radius : var-get ($theme , ' item-border-radius' );
427
427
color : var-get ($theme , ' item-text-color' );
428
- background : var-get ($theme , ' item-background' );
429
428
430
429
@if $bootstrap-theme or $variant == ' fluent' {
431
430
border-bottom : var-get ($theme , ' border-width' ) solid var-get ($theme , ' border-color' );
436
435
}
437
436
438
437
& :hover {
439
- color : var-get ($theme , ' item-text-color-hover' );
440
- background : var-get ($theme , ' item-background-hover' );
441
-
442
438
%igx-list__item-lines {
443
439
color : currentColor ;
444
440
}
544
540
align-items : center ;
545
541
position : relative ;
546
542
border-radius : var-get ($theme , ' item-border-radius' );
547
- background : inherit ;
543
+ background : var-get ( $theme , ' item-background ' ) ;
548
544
z-index : 2 ;
549
545
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
+ }
550
552
}
551
553
552
554
%igx-list-header ,
Original file line number Diff line number Diff line change 2
2
< section class ="sample-content " [igSize] ="properties.size ">
3
3
< article class ="sample-column ">
4
4
< 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 >
6
16
< igx-list-item [isHeader] ="true " selected > Employees List</ igx-list-item >
7
17
@for (employee of employeeItems; track employee) {
8
18
< igx-list-item [selected] ="employee.selected ">
Original file line number Diff line number Diff line change 1
1
.sample-title {
2
2
text-align : center ;
3
3
}
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 {
30
30
PropertyChangeService ,
31
31
PropertyPanelConfig ,
32
32
} from '../properties-panel/property-change.service' ;
33
+ import { HAMMER_GESTURE_CONFIG , HammerModule } from '@angular/platform-browser' ;
34
+ import Hammer from 'hammerjs' ;
33
35
34
36
defineComponents (
35
37
IgcListComponent ,
@@ -79,15 +81,27 @@ interface Employee {
79
81
IgxAvatarComponent ,
80
82
IgxButtonModule ,
81
83
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
+ }
83
96
]
84
97
} )
85
98
export class ListSampleComponent {
86
99
public panelConfig : PropertyPanelConfig = {
87
100
size : {
88
101
control : {
89
102
type : 'button-group' ,
90
- options : [ 'small' , 'medium' , 'large' ]
103
+ options : [ 'small' , 'medium' , 'large' ] ,
104
+ defaultValue : 'medium'
91
105
}
92
106
} ,
93
107
hideTitle : {
@@ -145,6 +159,13 @@ export class ListSampleComponent {
145
159
type : 'boolean' ,
146
160
defaultValue : false
147
161
}
162
+ } ,
163
+ enablePanning : {
164
+ label : 'Item Panning' ,
165
+ control : {
166
+ type : 'boolean' ,
167
+ defaultValue : false
168
+ }
148
169
}
149
170
}
150
171
You can’t perform that action at this time.
0 commit comments