How to use the @material/tab-indicator.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 jamesmfriedman / rmwc / src / tabs / tab-indicator.tsx View on Github external
this.root.removeClass(className);
      },
      computeContentClientRect: () =>
        this.content.ref
          ? this.content.ref.getBoundingClientRect()
          : ({} as ClientRect),
      setContentStyleProperty: (prop: string, value: string) => {
        this.content.setStyle(prop, value);
      }
    };

    if (this.props.transition === 'fade') {
      return new MDCFadingTabIndicatorFoundation(adapter);
    }

    return new MDCSlidingTabIndicatorFoundation(adapter);
  }
github jamesmfriedman / rmwc / src / tabs / tab-indicator-foundation.tsx View on Github external
rootEl.removeClass(className);
        },
        computeContentClientRect: () =>
          contentEl.ref
            ? contentEl.ref.getBoundingClientRect()
            : emptyClientRect,
        setContentStyleProperty: (prop: string, value: string) => {
          contentEl.setStyle(prop, value);
        }
      };

      if (props.transition === 'fade') {
        return new MDCFadingTabIndicatorFoundation(adapter);
      }

      return new MDCSlidingTabIndicatorFoundation(adapter);
    },
    api: ({
github angular / components / src / material-experimental / mdc-tabs / ink-bar.ts View on Github external
constructor(private _hostElement: HTMLElement, private _document: Document) {
    this._foundation = new MDCSlidingTabIndicatorFoundation(this._adapter);
  }