Add Menu header

This commit is contained in:
Mathieu Sanchez 2019-06-04 11:12:46 +09:00
parent 0fbd458817
commit 58f0ddedbb
2 changed files with 19 additions and 2 deletions

View File

@ -10,6 +10,7 @@ import { MatExpansionModule } from '@angular/material/expansion';
import { MatDatepickerModule } from '@angular/material/datepicker'; import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatSelectModule } from '@angular/material/select'; import { MatSelectModule } from '@angular/material/select';
import { FlexLayoutModule } from '@angular/flex-layout'; import { FlexLayoutModule } from '@angular/flex-layout';
import { MatMenuModule } from '@angular/material/menu';
@NgModule( { @NgModule( {
exports: [ exports: [
@ -26,6 +27,7 @@ import { FlexLayoutModule } from '@angular/flex-layout';
MatSelectModule, MatSelectModule,
MatTooltipModule, MatTooltipModule,
FlexLayoutModule, FlexLayoutModule,
MatMenuModule,
] ]
} ) } )
export class AppMaterialModule { export class AppMaterialModule {

View File

@ -9,16 +9,31 @@
<div fxFlex="calc(100% - 200px)" fxLayout="row" fxLayoutAlign="end"> <div fxFlex="calc(100% - 200px)" fxLayout="row" fxLayoutAlign="end">
<div fxFlex="60px"> <div fxFlex="60px">
<button mat-fab class="account-button">
<button [matMenuTriggerFor]="tripMenu" class="account-button" mat-fab>
<mat-icon>local_airport</mat-icon> <mat-icon>local_airport</mat-icon>
</button> </button>
<mat-menu #tripMenu="matMenu">
<button mat-menu-item>My Trips</button>
<button mat-menu-item>My Schedule</button>
</mat-menu>
</div> </div>
<div fxFlex="60px"> <div fxFlex="60px">
<button mat-fab class="account-button">
<button [matMenuTriggerFor]="profileMenu" class="account-button" mat-fab>
<mat-icon>person</mat-icon> <mat-icon>person</mat-icon>
</button> </button>
<mat-menu #profileMenu="matMenu">
<button mat-menu-item>Login</button>
<button mat-menu-item>Create Account</button>
</mat-menu>
</div> </div>
<div fxFlex="50px"> <div fxFlex="50px">
<!-- Search input --> <!-- Search input -->
</div> </div>