How to use the @material/switch/foundation.MDCSwitchFoundation 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 material-components / material-components-web-react / packages / switch / index.tsx View on Github external
componentDidMount() {
    this.foundation = new MDCSwitchFoundation(this.adapter);
    this.foundation.init();
    this.foundation.setChecked(this.props.checked!);
    this.foundation.setDisabled(this.props.disabled!);
  }