How to use the @material/tab-indicator/sliding-foundation.MDCSlidingTabIndicatorFoundation function in @material/tab-indicator

To help you get started, we’ve selected a few @material/tab-indicator 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 / tab-indicator / index.tsx View on Github external
componentDidMount() {
    if (this.props.fade) {
      this.foundation = new MDCFadingTabIndicatorFoundation(this.adapter);
    } else {
      this.foundation = new MDCSlidingTabIndicatorFoundation(this.adapter);
    }
    this.foundation.init();
    if (this.props.active) {
      this.foundation.activate();
    }
  }