bigbuffet-rw/app/soapbox/actions/snackbar.js

29 lines
603 B
JavaScript
Raw Normal View History

2020-09-21 20:56:15 -07:00
import { ALERT_SHOW } from './alerts';
export const show = (severity, message, actionLabel, actionLink) => ({
2020-09-21 20:56:15 -07:00
type: ALERT_SHOW,
message,
actionLabel,
actionLink,
2020-09-21 20:56:15 -07:00
severity,
});
export function info(message, actionLabel, actionLink) {
return show('info', message, actionLabel, actionLink);
2021-08-03 12:22:51 -07:00
}
2020-09-21 20:56:15 -07:00
export function success(message, actionLabel, actionLink) {
return show('success', message, actionLabel, actionLink);
2021-08-03 12:22:51 -07:00
}
2020-09-21 20:56:15 -07:00
export function error(message, actionLabel, actionLink) {
return show('error', message, actionLabel, actionLink);
2021-08-03 12:22:51 -07:00
}
2020-09-21 20:56:15 -07:00
export default {
info,
success,
error,
show,
2020-09-21 20:56:15 -07:00
};