Skip to content

Commit e2a7006

Browse files
author
Maged Hennawy
committed
Update chevron and architecture
1 parent 377c244 commit e2a7006

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,9 @@
1-
import { Component, Input, ChangeDetectorRef, Output, EventEmitter } from "@angular/core";
1+
import { Component, Input, ChangeDetectorRef, Output, EventEmitter, HostBinding } from "@angular/core";
22
import { Select } from "../select/select.component";
33

44
@Component({
55
selector: "ibm-timepicker-select",
66
template: `
7-
<div
8-
[ngClass]="{
9-
'bx--select--light': theme === 'light',
10-
'bx--skeleton': skeleton
11-
}"
12-
class="bx--select bx--time-picker__select">
137
<label *ngIf="!skeleton" [attr.for]="id" class="bx--label bx--visually-hidden">{{label}}</label>
148
<select
159
#select
@@ -19,18 +13,23 @@ import { Select } from "../select/select.component";
1913
class="bx--select-input">
2014
<ng-content></ng-content>
2115
</select>
22-
<svg *ngIf="!skeleton" class="bx--select__arrow" width="10" height="5" viewBox="0 0 10 5">
23-
<path d="M0 0l5 4.998L10 0z" fill-rule="evenodd" />
24-
</svg>
25-
</div>
16+
<ibm-icon-chevron-down16 *ngIf="!skeleton" class="bx--select__arrow"></ibm-icon-chevron-down16>
17+
2618
`
2719
})
2820
export class TimePickerSelect extends Select {
21+
@HostBinding("class.bx--select") timeSelect = true;
22+
@HostBinding("class.bx--time-picker__select") timePickerSelect = true;
23+
24+
@HostBinding("class.bx--skeleton") timePickerSelectSkeleton = this.skeleton;
25+
@HostBinding("class.bx--select--light") timePickerSelectLight = (true ? this.theme === "light" : false);
26+
2927
@Input() id = `timepicker-select-${TimePickerSelect.selectCount++}`;
3028

3129
@Output() valueChange: EventEmitter<string> = new EventEmitter();
3230

3331
onChange(event) {
3432
this.valueChange.emit(event.target.value);
33+
console.log(this.theme);
3534
}
3635
}

src/timepicker-select/timepicker-select.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { NgModule } from "@angular/core";
22
import { CommonModule } from "@angular/common";
33
import { TimePickerSelect } from "./timepicker-select.component";
44
import { SelectModule } from "../select/select.module";
5+
import { ChevronDown16Module } from "@carbon/icons-angular/lib/chevron--down/16";
56

67
@NgModule({
78
declarations: [
@@ -12,7 +13,8 @@ import { SelectModule } from "../select/select.module";
1213
],
1314
imports: [
1415
SelectModule,
15-
CommonModule
16+
CommonModule,
17+
ChevronDown16Module
1618
]
1719
})
1820
export class TimePickerSelectModule { }

0 commit comments

Comments
 (0)