Skip to content

Commit f3acbb9

Browse files
committed
feat: add side nav component
1 parent b5a96a1 commit f3acbb9

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<mat-drawer-container class="example-container" autosize>
2+
<mat-drawer opened="true" #drawer class="example-sidenav" mode="side">
3+
<p>Welcome</p>
4+
</mat-drawer>
5+
6+
<div class="example-sidenav-content">
7+
<mat-toolbar>
8+
<button (click)="drawer.toggle()" mat-button><i class="material-icons">menu</i></button>
9+
<span style="padding: 0 3%">My Application</span>
10+
</mat-toolbar>
11+
</div>
12+
13+
</mat-drawer-container>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.example-container {
2+
position: absolute;
3+
top: 0;
4+
bottom: 0;
5+
left: 0;
6+
right: 0;
7+
background: #eee;
8+
}
9+
10+
mat-drawer {
11+
width: 15%;
12+
text-align: center;
13+
background: #3f51b5;
14+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-sidenav',
5+
templateUrl: './sidenav.component.html',
6+
styleUrls: ['./sidenav.component.scss']
7+
})
8+
export class SidenavComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}

0 commit comments

Comments
 (0)