Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions projects/components/src/textarea/textarea.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

:host {
::ng-deep {
&.disabled {
background-color: $gray-2;
color: $gray-5;
cursor: not-allowed;
}

&.mat-form-field {
display: block;
height: 100%;
Expand Down
2 changes: 1 addition & 1 deletion projects/components/src/textarea/textarea.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { LoggerService } from '@hypertrace/common';
}
],
template: `
<mat-form-field class="fill-container" floatLabel="never">
<mat-form-field class="fill-container" [ngClass]="{ disabled: this.disabled }" floatLabel="never">
<textarea
class="textarea"
matInput
Expand Down
3 changes: 2 additions & 1 deletion projects/components/src/textarea/textarea.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { MatInputModule } from '@angular/material/input';
import { TextareaComponent } from './textarea.component';

@NgModule({
imports: [FormsModule, MatInputModule],
imports: [CommonModule, FormsModule, MatInputModule],
declarations: [TextareaComponent],
exports: [TextareaComponent]
})
Expand Down