How to use the @material/top-app-bar/index.MDCTopAppBar function in @material/top-app-bar

To help you get started, we’ve selected a few @material/top-app-bar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github material-components / material-components-web-catalog / src / frame / TopAppBarFramePage.js View on Github external
  initTopAppBar = topAppBarEle => this.topAppBar = topAppBarEle && new MDCTopAppBar(topAppBarEle);
github material-components / material-components-web-catalog / src / TopAppBarCatalog.js View on Github external
initTopAppBar = () => {
    if (this.state.topAppBar) {
      this.state.topAppBar.destroy();
    }
    this.setState({topAppBar: new MDCTopAppBar(this.topAppBarRef.current)});
  }
github material-components / material-components-web-catalog / src / frame / DrawerFramePage.js View on Github external
initTopAppBar = topAppBarEle => {
    const {match} = this.props;
    this.topAppBar = new MDCTopAppBar(topAppBarEle);


    if (match.params.type === 'dismissible' || match.params.type === 'modal') {
      topAppBarEle.addEventListener('MDCTopAppBar:nav', () => this.drawer.open = !this.drawer.open);
    }
  };