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

27 lines
399 B
JavaScript
Raw Normal View History

2020-09-21 20:56:15 -07:00
import { ALERT_SHOW } from './alerts';
export const show = (severity, message) => ({
2020-09-21 20:56:15 -07:00
type: ALERT_SHOW,
message,
severity,
});
export function info(message) {
2020-09-28 16:41:35 -07:00
return show('info', message);
2021-08-03 12:22:51 -07:00
}
2020-09-21 20:56:15 -07:00
export function success(message) {
2020-09-28 16:41:35 -07:00
return show('success', message);
2021-08-03 12:22:51 -07:00
}
2020-09-21 20:56:15 -07:00
export function error(message) {
2020-09-28 16:41:35 -07:00
return show('error', message);
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
};