Skip to content

Commit 95d2d31

Browse files
authored
feat(design): update active style for list component (#3356)
1 parent 4ec3743 commit 95d2d31

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

libs/design/list/src/list-item/list-item.component.ts

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
HostBinding,
66
ContentChild,
77
ElementRef,
8+
Input,
89
} from '@angular/core';
910

1011
import {
@@ -33,6 +34,9 @@ export class DaffListItemComponent {
3334
*/
3435
@HostBinding('class.daff-list-item') class = true;
3536

37+
/** Whether or not the header item is active */
38+
@Input() @HostBinding('class.active') active = false;
39+
3640
/**
3741
* @docs-private
3842
*/

libs/design/list/src/list-theme.scss

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@
2727
background-color: $base;
2828
}
2929

30-
&:hover {
30+
&:hover,
31+
&.active {
3132
&:after {
32-
background-color: theming.daff-illuminate($base, $neutral, 1);
33+
background-color: theming.daff-illuminate($base, $neutral, 2);
3334
}
3435
}
3536
}

libs/design/list/src/list/list.component.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
}
7272

7373
&:hover,
74-
&:active {
74+
&.active {
7575
&:after {
7676
opacity: 1;
7777
}

0 commit comments

Comments
 (0)