How to use the @material/top-app-bar.MDCTopAppBarFoundation.strings 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 jamesmfriedman / rmwc / src / top-app-bar / index.tsx View on Github external
componentDidMount() {
    super.componentDidMount();

    if (!this.props.scrollTarget) {
      this.handleTargetScroll = this.foundation.handleTargetScroll.bind(
        this.foundation
      );
      this.setScrollTarget(this.window);
    }

    this.navIcon =
      this.root.ref &&
      this.root.ref.querySelector(
        MDCTopAppBarFoundation.strings.NAVIGATION_ICON_SELECTOR
      );

    this.handleNavigationClick = this.foundation.handleNavigationClick.bind(
      this.foundation
    );

    this.navIcon &&
      this.navIcon.addEventListener('click', this.handleNavigationClick);
  }