How to use the @material/snackbar/dist/mdc.snackbar.min.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 SpringflowNL / aurelia-mdc-elements / dist / components / snackbar / mdc-snackbar.js View on Github external
_proto.showSnackbar = function showSnackbar(label, buttonLabel, dismissOnAction) {
    if (buttonLabel === void 0) {
      buttonLabel = "Close";
    }

    if (dismissOnAction === void 0) {
      dismissOnAction = true;
    }

    this.mdcSnackbar = new _mdcSnackbar.MDCSnackbar(this.element);
    this.mdcSnackbar.closeOnEscape = dismissOnAction;
    this.mdcSnackbar.labelText = label;
    this.mdcSnackbar.actionButtonText = buttonLabel;
    this.mdcSnackbar.open();
  };
github SpringflowNL / aurelia-mdc-elements / src / resources / components / snackbar / mdc-snackbar.js View on Github external
showSnackbar(label, buttonLabel = "Close", dismissOnAction = true) {
        this.mdcSnackbar = new MDCSnackbar(this.element);

        this.mdcSnackbar.closeOnEscape = dismissOnAction;
        this.mdcSnackbar.labelText = label;
        this.mdcSnackbar.actionButtonText = buttonLabel;

        this.mdcSnackbar.open();
    }
}
github SpringflowNL / aurelia-mdc-elements / dist / es2015 / components / snackbar / mdc-snackbar.js View on Github external
showSnackbar(label, buttonLabel = 'Cancel', dismissOnAction = true) {
		this.mdcSnackbar = new MDCSnackbar(this.element);

		this.mdcSnackbar.dismissesOnAction = dismissOnAction;

		const data = {
			message: label,
			timout: 2750,
			actionText: buttonLabel
		};
		data.actionHandler = function () {};

		this.mdcSnackbar.show(data);
	}
}) || _class) || _class);
github SpringflowNL / aurelia-mdc-elements / dist / commonjs / components / snackbar / mdc-snackbar.js View on Github external
MdcSnackbar.prototype.showSnackbar = function showSnackbar(label) {
		var buttonLabel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'Cancel';
		var dismissOnAction = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;

		this.mdcSnackbar = new _mdcSnackbar.MDCSnackbar(this.element);

		this.mdcSnackbar.dismissesOnAction = dismissOnAction;

		var data = {
			message: label,
			timout: 2750,
			actionText: buttonLabel
		};
		data.actionHandler = function () {};

		this.mdcSnackbar.show(data);
	};