actionsForModal.js 390 B

1234567891011
  1. export const actionIsOpen = (value) => ({type: 'OPEN', value});
  2. export const actionModalContent = (value) => ({type: 'CONTENT', value});
  3. export const actionModalDraft = (value, draftName) => ({type: 'MODALDRAFT', value, draftName});
  4. export const actionOpenModal = (content) =>
  5. dispatch => {
  6. dispatch(actionModalContent(content));
  7. dispatch(actionIsOpen(true));
  8. }