Here are basic examples of Snackbar in action.
Inittialize Snache-js
let snackbar = new SnackBar({
snackbarText: "Something went wrong"
})
snackbar.init()
let snackbar = new SnackBar({
snackbarText: "Something went wrong"
})
snackbar.init()
snackbar = new SnackBar({
showIcon: true,
iconName: "bug"
visibility: true,
snackbarText: "Something went wrong"
})
snackbar = new SnackBar({
showIcon: true,
iconName: "bug",
visibility: true,
snackbarText: "Something went wrong",
visibility: true,
snackbarText: "Something went wrong",
actionText: "cancel",
action: true,
handler: () => {
snackbar.hide()
}
})
snackbar.show()
snackbar = new SnackBar({
showIcon: true,
iconName: "bug",
visibility: true,
snackbarBg: "red",
snackbarText: "Something went wrong",
visibility: true,
actionText: "cancel",
action: true,
handler: () => {
snackbar.hide()
}
})
snackbar.show()