Skip to content

Commit ecd5127

Browse files
author
Patricio Albizu
committed
feat: adding new display view
1 parent d08866a commit ecd5127

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

projects/components/src/select/select.component.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@
7272
border-radius: 6px;
7373
}
7474

75+
&.menu-with-background {
76+
background-color: $gray-1;
77+
padding-top: 1px;
78+
border-radius: 4px;
79+
80+
.trigger-label {
81+
@include body-1-medium($gray-9);
82+
}
83+
84+
.trigger-icon {
85+
padding-top: 1px;
86+
}
87+
}
88+
7589
&.justify-left {
7690
justify-content: flex-start;
7791
}

projects/components/src/select/select.component.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ import { SelectSize } from './select-size';
7575
>
7676
</ht-icon>
7777
</div>
78+
<div
79+
*ngSwitchCase="'${SelectTriggerDisplayMode.MenuWithBackground}'"
80+
class="trigger-content menu-with-background"
81+
[ngClass]="[this.justifyClass]"
82+
>
83+
<ht-label class="trigger-label" [label]="selected?.selectedLabel || selected?.label || this.placeholder">
84+
</ht-label>
85+
<ht-icon class="trigger-icon" icon="${IconType.ChevronDown}" size="${IconSize.Small}"> </ht-icon>
86+
</div>
7887
</div>
7988
</ht-popover-trigger>
8089
<ht-popover-content>
@@ -240,5 +249,6 @@ export class SelectComponent<V> implements AfterContentInit, OnChanges {
240249

241250
export const enum SelectTriggerDisplayMode {
242251
MenuWithBorder = 'menu-with-border',
252+
MenuWithBackground = 'menu-with-background',
243253
Icon = 'icon'
244254
}

0 commit comments

Comments
 (0)