How to use the @material/checkbox.MDCCheckbox function in @material/checkbox

To help you get started, we’ve selected a few @material/checkbox 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 dessant / search-by-image / src / components / Checkbox.vue View on Github external
mounted: function() {
    const mdcCheckbox = new MDCCheckbox(this.$el);
    const ripple = new MDCRipple(this.$el);
    ripple.unbounded = true;
    this.$nextTick(function() {
      this.$parent.$emit('input-mounted', mdcCheckbox);
    });
  }
};
github fintechstudios / angularjs-mdc / src / mdc-checkbox / mdc-checkbox.js View on Github external
constructor(...args) {
    super(...args);

    this.$element.addClass('mdc-checkbox');
    this.mdc = new MDCCheckbox(this.$element[0]);

    this.$element.ready(() => {
      this.mdc.ripple.layout();
    });
  }
github Tencent / omi / packages / omim / src / checkbox / index.tsx View on Github external
installed() {
    const checkbox = new MDCCheckbox(this.shadowRoot.querySelector('.mdc-checkbox'))
    const formField = new MDCFormField(this.shadowRoot.querySelector('.mdc-form-field'))
		formField.input = checkbox
  }
github prateekbh / preact-material-components / packages / checkbox / src / index.tsx View on Github external
public componentDidMount() {
    super.componentDidMount();
    if (this.control) {
      this.MDComponent = new MDCCheckbox(this.control);
      this.control.addEventListener('change', this.onChange);
    }
    this.afterComponentDidMount();
  }
github matsp / material-components-vue / src / components / Checkbox / Checkbox.vue View on Github external
mounted() {
        this.mdcCheckbox = new MDCCheckbox(this.$el)
        this.mdcCheckbox.indeterminate = this.indeterminate
    },
    destroyed() {
github cdr / code-server / packages / app / browser / src / app.ts View on Github external
document.querySelectorAll(".mdc-checkbox").forEach((d) => new MDCCheckbox(d));