How to use the @material/checkbox/dist/mdc.checkbox.MDCCheckboxFoundation 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 gutenye / react-mc / src / Checkbox / Checkbox.js View on Github external
getDefaultFoundation() {
    // prettier-ignore
    return new MDCCheckboxFoundation({
      addClass: helper.addClass('rootProps', this),
      removeClass: helper.removeClass('rootProps', this),
      registerAnimationEndHandler: helper.registerHandler('rootProps', this, 'animationend'),
      deregisterAnimationEndHandler: helper.deregisterHandler('rootProps', this, 'animationed'),
      registerChangeHandler: helper.registerHandler('nativeCbProps', this, 'change'),
      deregisterChangeHandler: helper.deregisterHandler('nativeCbProps', this, 'change'),
      getNativeControl: () => this.nativeCb_,
      forceLayout: () => this.root_.offsetWidth,
      isAttachedToDOM: helper.isAttachedToDOM('root', this),
    })
  }
github react-mdc / react-material-components-web / packages / checkbox / src / Container.tsx View on Github external
constructor(props) {
        super(props);
        this.adapter = new FoundationAdapter();
        this.foundation = new MDCCheckboxFoundation(this.adapter.toObject());
    }