How to use @material/notched-outline - 10 common examples

To help you get started, we’ve selected a few @material/notched-outline 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 matsp / material-components-vue / components / notched-outline / NotchedOutline.vue View on Github external
mounted () {
    if (!(this.getOutline instanceof Function)) { // can not be init by parent
      this.mdcNotchedOutline = MDCNotchedOutline.attachTo(this.$el)
    }
  },
  beforeDestroy () {
github pgbross / vue-material-adapter / packages / mcwv-notched-outline / mdc-notched-outline.js View on Github external
} = MDCnotchedOutlineFoundation.cssClasses;

    const adapter = {
      addClass: className => {
        this.$set(this.outlinedClasses, className, true);
      },
      removeClass: className => {
        this.$delete(this.outlinedClasses, className);
      },

      setNotchWidthProperty: width =>
        this.$set(this.notchStyles, 'width', `${width}px`),
      removeNotchWidthProperty: () => this.$delete(this.notchStyles, 'width'),
    };

    this.foundation = new MDCnotchedOutlineFoundation(adapter);
    this.foundation.init();

    const key = this.$slots.default ? OUTLINE_UPGRADED : NO_LABEL;
    this.$set(this.outlinedClasses, key, true);
  },
github pgbross / vue-material-adapter / packages / mcwv-notched-outline / notched-outline.js View on Github external
} = MDCnotchedOutlineFoundation.cssClasses;

    const adapter = {
      addClass: className => {
        this.$set(this.outlinedClasses, className, true);
      },
      removeClass: className => {
        this.$delete(this.outlinedClasses, className);
      },

      setNotchWidthProperty: width =>
        this.$set(this.notchStyles, 'width', `${width}px`),
      removeNotchWidthProperty: () => this.$delete(this.notchStyles, 'width'),
    };

    this.foundation = new MDCnotchedOutlineFoundation(adapter);
    this.foundation.init();

    const key = this.$slots.default ? OUTLINE_UPGRADED : NO_LABEL;
    this.$set(this.outlinedClasses, key, true);
  },
github pgbross / vue-material-adapter / packages / mcwv-notched-outline / mdc-notched-outline.js View on Github external
mounted() {
    const {
      OUTLINE_UPGRADED,
      NO_LABEL,
    } = MDCnotchedOutlineFoundation.cssClasses;

    const adapter = {
      addClass: className => {
        this.$set(this.outlinedClasses, className, true);
      },
      removeClass: className => {
        this.$delete(this.outlinedClasses, className);
      },

      setNotchWidthProperty: width =>
        this.$set(this.notchStyles, 'width', `${width}px`),
      removeNotchWidthProperty: () => this.$delete(this.notchStyles, 'width'),
    };

    this.foundation = new MDCnotchedOutlineFoundation(adapter);
    this.foundation.init();
github pgbross / vue-material-adapter / packages / mcwv-notched-outline / notched-outline.js View on Github external
mounted() {
    const {
      OUTLINE_UPGRADED,
      NO_LABEL,
    } = MDCnotchedOutlineFoundation.cssClasses;

    const adapter = {
      addClass: className => {
        this.$set(this.outlinedClasses, className, true);
      },
      removeClass: className => {
        this.$delete(this.outlinedClasses, className);
      },

      setNotchWidthProperty: width =>
        this.$set(this.notchStyles, 'width', `${width}px`),
      removeNotchWidthProperty: () => this.$delete(this.notchStyles, 'width'),
    };

    this.foundation = new MDCnotchedOutlineFoundation(adapter);
    this.foundation.init();
github material-components / material-components-web-react / packages / notched-outline / index.tsx View on Github external
componentDidMount() {
    this.foundation = new MDCNotchedOutlineFoundation(this.adapter);
    this.foundation.init();
    this.notch();

    if (this.label) {
      this.label.style.transitionDuration = '0s';
      this.addClass(cssClasses.OUTLINE_UPGRADED);
      requestAnimationFrame(() => {
        if (this.label) {
          this.label.style.transitionDuration = '';
        }
      });
    }
  }
github SpringflowNL / aurelia-mdc-elements / node_modules / @material / select / component.js View on Github external
        if (outlineFactory === void 0) { outlineFactory = function (el) { return new MDCNotchedOutline(el); }; }
        if (menuFactory === void 0) { menuFactory = function (el) { return new MDCMenu(el); }; }
github SpringflowNL / aurelia-mdc-elements / node_modules / @material / textfield / component.js View on Github external
        if (outlineFactory === void 0) { outlineFactory = function (el) { return new MDCNotchedOutline(el); }; }
        this.input_ = this.root_.querySelector(strings.INPUT_SELECTOR);
github material-components / material-components-web / packages / mdc-textfield / component.ts View on Github external
      outlineFactory: MDCNotchedOutlineFactory = (el) => new MDCNotchedOutline(el),
  ) {
github material-components / material-components-web / packages / mdc-select / component.ts View on Github external
      outlineFactory: MDCNotchedOutlineFactory = (el) => new MDCNotchedOutline(el),
      menuFactory: MDCMenuFactory = (el) => new MDCMenu(el),