Sha256: 3315255263c2108996067bf3355f8d154bacc4a2b7b908953fb1bde14a9cf3ee
Contents?: true
Size: 517 Bytes
Versions: 31
Compression:
Stored size: 517 Bytes
Contents
import store from 'foremanReact/redux'; import * as ToastActions from 'foremanReact/redux/actions/toasts'; const isStickyType = type => !['success', 'info'].includes(type); /** * Notify the user with a toast-notification */ export const notify = ({ message, type, link, sticky = isStickyType(type), }) => store.dispatch(ToastActions.addToast({ type, message, sticky, link, })); /** * Clear all toast notifications */ export const clear = () => store.dispatch(ToastActions.clearToasts());
Version data entries
31 entries across 31 versions & 1 rubygems