Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_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();
};
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();
}
}
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);
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);
};