Skip to content

build: add dev app for MDC sidenav #19282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@
/src/dev-app/mdc-progress-bar/** @crisbeto
/src/dev-app/mdc-radio/** @mmalerba
/src/dev-app/mdc-snackbar/** @opozo
/src/dev-app/mdc-sidenav/** @crisbeto
/src/dev-app/mdc-slide-toggle/** @crisbeto
/src/dev-app/mdc-slider/** @devversion
/src/dev-app/mdc-table/** @andrewseguin
Expand Down
1 change: 1 addition & 0 deletions src/dev-app/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ ng_module(
"//src/dev-app/mdc-menu",
"//src/dev-app/mdc-progress-bar",
"//src/dev-app/mdc-radio",
"//src/dev-app/mdc-sidenav",
"//src/dev-app/mdc-slide-toggle",
"//src/dev-app/mdc-slider",
"//src/dev-app/mdc-snackbar",
Expand Down
1 change: 1 addition & 0 deletions src/dev-app/dev-app/dev-app-layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export class DevAppLayout {
{name: 'MDC Radio', route: '/mdc-radio'},
{name: 'MDC Progress Bar', route: '/mdc-progress-bar'},
{name: 'MDC Tabs', route: '/mdc-tabs'},
{name: 'MDC Sidenav', route: '/mdc-sidenav'},
{name: 'MDC Slide Toggle', route: '/mdc-slide-toggle'},
{name: 'MDC Slider', route: '/mdc-slider'},
{name: 'MDC Snackbar', route: '/mdc-snackbar'},
Expand Down
1 change: 1 addition & 0 deletions src/dev-app/dev-app/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const DEV_APP_ROUTES: Routes = [
{path: 'mdc-list', loadChildren: 'mdc-list/mdc-list-demo-module#MdcListDemoModule'},
{path: 'mdc-menu', loadChildren: 'mdc-menu/mdc-menu-demo-module#MdcMenuDemoModule'},
{path: 'mdc-radio', loadChildren: 'mdc-radio/mdc-radio-demo-module#MdcRadioDemoModule'},
{path: 'mdc-sidenav', loadChildren: 'mdc-sidenav/mdc-sidenav-demo-module#MdcSidenavDemoModule'},
{
path: 'mdc-snackbar',
loadChildren: 'mdc-snackbar/mdc-snackbar-demo-module#MdcSnackbarDemoModule'
Expand Down
22 changes: 22 additions & 0 deletions src/dev-app/mdc-sidenav/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
load("//tools:defaults.bzl", "ng_module")

package(default_visibility = ["//visibility:public"])

ng_module(
name = "mdc-sidenav",
srcs = glob(["**/*.ts"]),
assets = [
"mdc-sidenav-demo.html",
":mdc_sidenav_demo_scss",
],
deps = [
"//src/material-experimental/mdc-sidenav",
"@npm//@angular/router",
],
)

sass_binary(
name = "mdc_sidenav_demo_scss",
src = "mdc-sidenav-demo.scss",
)
22 changes: 22 additions & 0 deletions src/dev-app/mdc-sidenav/mdc-sidenav-demo-module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import {NgModule} from '@angular/core';
import {MatSidenavModule} from '@angular/material-experimental/mdc-sidenav';
import {RouterModule} from '@angular/router';
import {MdcSidenavDemo} from './mdc-sidenav-demo';

@NgModule({
imports: [
MatSidenavModule,
RouterModule.forChild([{path: '', component: MdcSidenavDemo}]),
],
declarations: [MdcSidenavDemo],
})
export class MdcSidenavDemoModule {
}
2 changes: 2 additions & 0 deletions src/dev-app/mdc-sidenav/mdc-sidenav-demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<!-- TODO: copy in demo template from existing mat-sidenav demo. -->
Not yet implemented.
1 change: 1 addition & 0 deletions src/dev-app/mdc-sidenav/mdc-sidenav-demo.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// TODO: copy in demo styles from existing mat-sidenav demo.
17 changes: 17 additions & 0 deletions src/dev-app/mdc-sidenav/mdc-sidenav-demo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import {Component} from '@angular/core';

@Component({
selector: 'mdc-sidenav-demo',
templateUrl: 'mdc-sidenav-demo.html',
styleUrls: ['mdc-sidenav-demo.css'],
})
export class MdcSidenavDemo {
}