How to use the @material/switch.MDCSwitch function in @material/switch

To help you get started, we’ve selected a few @material/switch 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 prateekbh / preact-material-components / ts / Switch / index.tsx View on Github external
public componentDidMount() {
    super.componentDidMount();
    if (this.control) {
      this.MDComponent = new MDCSwitch(this.control);
    }
  }
github Tencent / omi / packages / omim / src / switch / index.tsx View on Github external
installed() {
    this.switchControl = new MDCSwitch(this.shadowRoot.querySelector('.mdc-switch'))
    this.switchFoundation = this.switchControl.getDefaultFoundation()

    this.initSwitch()
  }
github springtype-org / springtype / src / packages / material-ui / src / component / mwc-switch / mwc-switch.tsx View on Github external
onBeforeFlow() {
        const switchElement = this.querySelector('.mdc-switch');
        if (switchElement) {
            this.mwcInstance = new MDCSwitch(switchElement);
        }
    }
}