How to use the @material/snackbar/.MDCSnackbar 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 / ts / Snackbar / index.tsx View on Github external
public componentDidMount() {
    super.componentDidMount();
    if (this.control) {
      this.MDComponent = new MDCSnackbar(this.control);
      if (
        this.props.dismissesOnAction === undefined ||
        this.props.dismissesOnAction === null
      ) {
        this.MDComponent.dismissesOnAction = true;
      } else {
        this.MDComponent.dismissesOnAction = this.props.dismissesOnAction;
      }
    }
  }