Skip to content

Commit

Permalink
md-sidenav-layout has been deprecated in favour of md-sidenav-container
Browse files Browse the repository at this point in the history
  • Loading branch information
grizzm0 committed Feb 8, 2017
1 parent 1be3ba8 commit e586e29
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<gpf-sidenav-layout></gpf-sidenav-layout>
<gpf-sidenav-container></gpf-sidenav-container>
6 changes: 3 additions & 3 deletions src/app/layout/layout.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MaterialModule } from '@angular/material';

import { SidenavLayoutComponent } from './sidenav-layout/sidenav-layout.component';
import { SidenavContainerComponent } from './sidenav-container/sidenav-container.component';
import { ToolbarComponent } from './toolbar/toolbar.component';

@NgModule({
Expand All @@ -11,10 +11,10 @@ import { ToolbarComponent } from './toolbar/toolbar.component';
MaterialModule.forRoot(),
],
exports: [
SidenavLayoutComponent,
SidenavContainerComponent,
],
declarations: [
SidenavLayoutComponent,
SidenavContainerComponent,
ToolbarComponent,
],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<gpf-toolbar *ngIf="!isSmallScreen()" [isSmallScreen]="isSmallScreen()"></gpf-toolbar>

<md-sidenav-layout [class.is-small-screen]="isSmallScreen()">
<md-sidenav-container [class.is-small-screen]="isSmallScreen()">
<md-sidenav [opened]="!isSmallScreen()" [mode]="isSmallScreen() ? 'over' : 'side'">
Sidenav
</md-sidenav>
Expand All @@ -10,4 +10,4 @@
<main>
Content
</main>
</md-sidenav-layout>
</md-sidenav-container>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$main-padding: 16px;
$sidenav-width: 256px;

md-sidenav-layout {
md-sidenav-container {
height: 100vh;

&:not(.is-small-screen) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { MaterialModule } from '@angular/material';

import { SidenavLayoutComponent } from './sidenav-layout.component';
import { SidenavContainerComponent } from './sidenav-container.component';
import { ToolbarComponent } from '../toolbar/toolbar.component';

describe('SidenavLayoutComponent', () => {
let component: SidenavLayoutComponent;
let fixture: ComponentFixture<SidenavLayoutComponent>;
describe('SidenavContainerComponent', () => {
let component: SidenavContainerComponent;
let fixture: ComponentFixture<SidenavContainerComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
MaterialModule.forRoot(),
],
declarations: [
SidenavLayoutComponent,
SidenavContainerComponent,
ToolbarComponent,
],
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(SidenavLayoutComponent);
fixture = TestBed.createComponent(SidenavContainerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { MdSidenav } from '@angular/material';
const MD_BREAKPOINT = 960;

@Component({
selector: 'gpf-sidenav-layout',
templateUrl: './sidenav-layout.component.html',
styleUrls: ['./sidenav-layout.component.scss']
selector: 'gpf-sidenav-container',
templateUrl: './sidenav-container.component.html',
styleUrls: ['./sidenav-container.component.scss']
})
export class SidenavLayoutComponent implements OnInit {
export class SidenavContainerComponent implements OnInit {
@ViewChild(MdSidenav) drawer: MdSidenav;

ngOnInit(): void {
Expand Down

0 comments on commit e586e29

Please sign in to comment.