How to use the @material/floating-label/foundation.MDCFloatingLabelFoundation.cssClasses function in @material/floating-label

To help you get started, we’ve selected a few @material/floating-label 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 / notched-outline / index.tsx View on Github external
get label() {
    if (!this.notchedEl.current) {
      return null;
    }
    return this.notchedEl.current.querySelector(`.${MDCFloatingLabelFoundation.cssClasses.ROOT}`);
  }
github material-components / material-components-web-react / packages / floating-label / index.tsx View on Github external
onShakeEnd = () => {
    const {LABEL_SHAKE} = MDCFloatingLabelFoundation.cssClasses;
    this.removeClassFromClassList(LABEL_SHAKE);
  };
github material-components / material-components-web / packages / mdc-notched-outline / component.ts View on Github external
initialSyncWithDOM() {
    this.notchElement_ = this.root_.querySelector(strings.NOTCH_ELEMENT_SELECTOR)!;

    const label = this.root_.querySelector('.' + MDCFloatingLabelFoundation.cssClasses.ROOT);
    if (label) {
      label.style.transitionDuration = '0s';
      this.root_.classList.add(cssClasses.OUTLINE_UPGRADED);
      requestAnimationFrame(() => {
        label.style.transitionDuration = '';
      });
    } else {
      this.root_.classList.add(cssClasses.NO_LABEL);
    }
  }