Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Commit 4a22e64

Browse files
anandtiwaryjaywalker21
authored andcommitted
refactor: minor style change support for combo box (hypertrace#1336)
1 parent 3d5222e commit 4a22e64

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

projects/components/src/combo-box/combo-box.component.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@
1111
align-items: center;
1212
height: inherit;
1313
width: inherit;
14-
border: 1px solid $color-border;
1514
border-radius: 6px;
1615

16+
&.show-border {
17+
border: 1px solid $color-border;
18+
}
19+
1720
&.chip {
1821
border: 1px solid transparent;
1922

projects/components/src/combo-box/combo-box.component.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ import { ComboBoxMode, ComboBoxOption, ComboBoxResult } from './combo-box-api';
3939
<div
4040
#trigger
4141
class="popover-trigger"
42-
[ngClass]="this.mode"
42+
[ngClass]="{
43+
input: this.mode === '${ComboBoxMode.Input}',
44+
chip: this.mode === '${ComboBoxMode.Chip}',
45+
'show-border': this.showBorder
46+
}"
4347
[class.has-text]="this.text"
4448
[class.input-focused]="input.matches(':focus')"
4549
>
@@ -149,6 +153,9 @@ export class ComboBoxComponent<TValue = string> implements AfterViewInit, OnChan
149153
@Input()
150154
public options?: ComboBoxOption<TValue>[] = [];
151155

156+
@Input()
157+
public showBorder: boolean = true;
158+
152159
@Output()
153160
public readonly textChange: EventEmitter<string> = new EventEmitter();
154161

projects/components/src/form-field/form-field.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
&.error-border {
4444
border: 1px solid $red-3;
45+
border-radius: 6px;
4546
}
4647
}
4748

0 commit comments

Comments
 (0)