2020-09-21 20:56:15 -07:00
|
|
|
import { ALERT_SHOW } from './alerts';
|
|
|
|
|
2022-01-27 07:00:05 -08:00
|
|
|
export const show = (severity, message, actionLabel, actionLink) => ({
|
2020-09-21 20:56:15 -07:00
|
|
|
type: ALERT_SHOW,
|
|
|
|
message,
|
2022-01-27 07:00:05 -08:00
|
|
|
actionLabel,
|
|
|
|
actionLink,
|
2020-09-21 20:56:15 -07:00
|
|
|
severity,
|
|
|
|
});
|
|
|
|
|
2022-01-27 07:00:05 -08:00
|
|
|
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
|
|
|
|
2022-01-27 07:00:05 -08: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
|
|
|
|
2022-01-27 07:00:05 -08: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,
|
2021-10-19 10:29:54 -07:00
|
|
|
show,
|
2020-09-21 20:56:15 -07:00
|
|
|
};
|