Mangane/app/soapbox/actions/snackbar.js
marcin mikołajczak bf7cd98c03 Add 'View' action link to some notifications
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-01-27 16:00:05 +01:00

28 lines
603 B
JavaScript

import { ALERT_SHOW } from './alerts';
export const show = (severity, message, actionLabel, actionLink) => ({
type: ALERT_SHOW,
message,
actionLabel,
actionLink,
severity,
});
export function info(message, actionLabel, actionLink) {
return show('info', message, actionLabel, actionLink);
}
export function success(message, actionLabel, actionLink) {
return show('success', message, actionLabel, actionLink);
}
export function error(message, actionLabel, actionLink) {
return show('error', message, actionLabel, actionLink);
}
export default {
info,
success,
error,
show,
};