Skip to content

Commit 00b913a

Browse files
palbizuPatricio Albizu
andauthored
feat: adding textarea disabled style (#1484)
* feat: adding textarea disabled style * feat: fix comments * feat: fix comments Co-authored-by: Patricio Albizu <patricioalbizu@Patricios-MacBook-Pro.local>
1 parent 5fd07f6 commit 00b913a

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

projects/components/src/textarea/textarea.component.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,9 @@
7070
height: 100%;
7171
width: 100%;
7272
}
73+
74+
.disabled {
75+
background-color: $gray-2;
76+
color: $gray-5;
77+
cursor: not-allowed;
78+
}

projects/components/src/textarea/textarea.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { LoggerService } from '@hypertrace/common';
2222
}
2323
],
2424
template: `
25-
<mat-form-field class="fill-container" floatLabel="never">
25+
<mat-form-field class="fill-container" [ngClass]="{ disabled: this.disabled }" floatLabel="never">
2626
<textarea
2727
class="textarea"
2828
matInput

projects/components/src/textarea/textarea.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import { CommonModule } from '@angular/common';
12
import { NgModule } from '@angular/core';
23
import { FormsModule } from '@angular/forms';
34
import { MatInputModule } from '@angular/material/input';
45
import { TextareaComponent } from './textarea.component';
56

67
@NgModule({
7-
imports: [FormsModule, MatInputModule],
8+
imports: [CommonModule, FormsModule, MatInputModule],
89
declarations: [TextareaComponent],
910
exports: [TextareaComponent]
1011
})

0 commit comments

Comments
 (0)