How to use the @material/top-app-bar/short/foundation.MDCShortTopAppBarFoundation 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-react / packages / top-app-bar / index.tsx View on Github external
private initializeFoundation = () => {
    const {short, shortCollapsed, fixed} = this.props;
    if (this.foundation) {
      this.foundation.destroy();
    }
    if (short || shortCollapsed) {
      this.foundation = new MDCShortTopAppBarFoundation(this.adapter);
    } else if (fixed) {
      this.foundation = new MDCFixedTopAppBarFoundation(this.adapter);
    } else {
      this.foundation = new MDCTopAppBarFoundation(this.adapter);
    }

    this.foundation.init();
  };