Skip to content

Commit f1768cb

Browse files
committed
added and incorporated basic presentation components
1 parent e49006d commit f1768cb

22 files changed

+168
-24
lines changed

src/app/app.component.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
<!--The whole content below can be removed with the new code.-->
1+
<app-toolbar></app-toolbar>
22
<div style="text-align:center">
3-
<h1>
4-
{{title}}!!
5-
</h1>
63
<app-login></app-login>
7-
</div>
8-
4+
</div>

src/app/app.module.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
55
import { FeCommonModule } from './common/common.module';
66
import { AppComponent } from './app.component';
77

8-
import { MatButtonModule, MatCheckboxModule} from '@angular/material';
8+
import { MatToolbarModule} from '@angular/material';
99

1010
@NgModule({
1111
declarations: [
@@ -14,7 +14,14 @@ import { MatButtonModule, MatCheckboxModule} from '@angular/material';
1414
imports: [
1515
BrowserModule,
1616
BrowserAnimationsModule,
17-
FeCommonModule
17+
FeCommonModule,
18+
MatToolbarModule
19+
],
20+
exports: [
21+
BrowserModule,
22+
BrowserAnimationsModule,
23+
FeCommonModule,
24+
MatToolbarModule
1825
],
1926
providers: [],
2027
bootstrap: [AppComponent]

src/app/common/common.module.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ import { CommonModule } from '@angular/common';
33
import { TextBoxComponent } from './components/presentation/text-box/text-box.component';
44
import { LoginComponent } from './components/smart/login/login.component';
55
import { CheckBoxComponent } from './components/presentation/check-box/check-box.component';
6+
import { ToolbarComponent } from './components/presentation/toolbar/toolbar.component';
7+
import { RaisedButtonComponent } from './components/presentation/raised-button/raised-button.component';
8+
import { BasicButtonComponent } from './components/presentation/basic-button/basic-button.component';
9+
import { MatToolbarModule, MatCheckboxModule, MatButtonModule, MatFormFieldModule, MatInputModule, MatIconModule} from '@angular/material';
610

711
@NgModule({
812
imports: [
9-
CommonModule
13+
CommonModule, MatToolbarModule, MatCheckboxModule, MatButtonModule, MatFormFieldModule, MatInputModule, MatIconModule
1014
],
11-
declarations: [TextBoxComponent, LoginComponent, CheckBoxComponent],
12-
exports: [
13-
LoginComponent, TextBoxComponent, CheckBoxComponent]
15+
declarations: [TextBoxComponent, LoginComponent, CheckBoxComponent, ToolbarComponent, RaisedButtonComponent, BasicButtonComponent],
16+
exports: [LoginComponent, TextBoxComponent, CheckBoxComponent, ToolbarComponent, RaisedButtonComponent, MatFormFieldModule],
1417
})
1518
export class FeCommonModule { }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<button mat-button color="accent">{{label}}</button>

src/app/common/components/presentation/basic-button/basic-button.component.scss

Whitespace-only changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { BasicButtonComponent } from './basic-button.component';
4+
5+
describe('BasicButtonComponent', () => {
6+
let component: BasicButtonComponent;
7+
let fixture: ComponentFixture<BasicButtonComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ BasicButtonComponent ]
12+
})
13+
.compileComponents();
14+
}));
15+
16+
beforeEach(() => {
17+
fixture = TestBed.createComponent(BasicButtonComponent);
18+
component = fixture.componentInstance;
19+
fixture.detectChanges();
20+
});
21+
22+
it('should be created', () => {
23+
expect(component).toBeTruthy();
24+
});
25+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-basic-button',
5+
templateUrl: './basic-button.component.html',
6+
styleUrls: ['./basic-button.component.scss']
7+
})
8+
export class BasicButtonComponent implements OnInit {
9+
10+
label = 'Register'
11+
12+
constructor() { }
13+
14+
ngOnInit() {
15+
}
16+
17+
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
<p>
2-
DRIVER-CHECKBOX
3-
</p>
1+
<mat-checkbox>{{label}}</mat-checkbox>

src/app/common/components/presentation/check-box/check-box.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import { Component, OnInit } from '@angular/core';
77
})
88
export class CheckBoxComponent implements OnInit {
99

10+
label = 'Remember my credentials'
11+
1012
constructor() { }
1113

1214
ngOnInit() {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<button mat-raised-button color="primary">{{label}}</button>

0 commit comments

Comments
 (0)