adding dashbord
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<h1 mat-dialog-title>Add Text</h1>
|
||||
<div mat-dialog-content>
|
||||
<mat-form-field appearance="fill">
|
||||
<mat-label>Text</mat-label>
|
||||
<textarea matInput [(ngModel)]="text"></textarea>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div mat-dialog-actions align="end">
|
||||
<button mat-button mat-dialog-close>Cancel</button>
|
||||
<button mat-button mat-dialog-close (click)="onSaveClick()" cdkFocusInitial>Save</button>
|
||||
</div>
|
||||
@@ -0,0 +1,3 @@
|
||||
textarea {
|
||||
height: 5em;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AddTextDialogComponent } from './add-text-dialog.component';
|
||||
|
||||
describe('AddTextDialogComponent', () => {
|
||||
let component: AddTextDialogComponent;
|
||||
let fixture: ComponentFixture<AddTextDialogComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ AddTextDialogComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(AddTextDialogComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,18 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { MatDialogRef } from '@angular/material/dialog';
|
||||
|
||||
@Component({
|
||||
selector: 'app-add-text-dialog',
|
||||
templateUrl: './add-text-dialog.component.html',
|
||||
styleUrls: ['./add-text-dialog.component.scss']
|
||||
})
|
||||
export class AddTextDialogComponent {
|
||||
text = "";
|
||||
|
||||
constructor(public dialogRef: MatDialogRef<string>){
|
||||
}
|
||||
|
||||
onSaveClick(): void {
|
||||
this.dialogRef.close(this.text);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user