How to use the @material/snackbar/.MDCSnackbar.attachTo function in @material/snackbar

To help you get started, we’ve selected a few @material/snackbar 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 / Snackbar / index.js View on Github external
componentDidMount() {
    this.MDComponent = MDCSnackbar.attachTo(this.control);
    if (
      this.props.dismissesOnAction === undefined ||
      this.props.dismissesOnAction === null
    ) {
      this.MDComponent.dismissesOnAction = true;
    } else {
      this.MDComponent.dismissesOnAction = this.props.dismissesOnAction;
    }
  }
  componentWillUnmount() {