Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
Fixed coloring for the hint-text. (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan-H11 committed Mar 23, 2022
1 parent 405dbe2 commit ad18acd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<span>
<label for="inputElement">{{label}}</label>
<input id="inputElement" type="text"
<label for="inputElement">{{label}}</label>
<input id="inputElement" type="text"
[placeholder]="placeholder"
(keydown.enter)="onEnter.emit()"
[class]="flavor"
[disabled]="disabled">
<small [class]="flavor" >{{hintText}}</small>
<small [class]="flavor+hintHaveColor()">{{hintText}}</small>
</span>

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ small {
display: block;
color: $grey-font;
@each $name, $colors in $flavors {
&.#{$name} { //TODO if(hintColored && !disabled)
&.#{$name}true {
color: list.nth($colors, 1);
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/core/components/inputs/text-input/text-input.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ export class TextInputComponent {

// eslint-disable-next-line @angular-eslint/no-output-on-prefix
@Output() public onEnter = new EventEmitter<InputEvent>();

hintHaveColor() {
return this.hintColored && !this.disabled;
}
}

0 comments on commit ad18acd

Please sign in to comment.