You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

actions.js 554B

123456789101112131415161718192021
  1. // @flow
  2. import { SET_ACTIVE_MODAL_ID } from './actionTypes';
  3. /**
  4. * Action to set the ID of the active modal (or undefined if needs to be hidden).
  5. *
  6. * @param {string} activeModalId - The new modal ID or undefined.
  7. * @param {Object} modalProps - The props to pass to the modal.
  8. * @returns {{
  9. * activeModalId: string,
  10. * type: SET_ACTIVE_MODAL_ID
  11. * }}
  12. */
  13. export function setActiveModalId(activeModalId: ?string, modalProps: Object = {}) {
  14. return {
  15. activeModalId,
  16. modalProps,
  17. type: SET_ACTIVE_MODAL_ID
  18. };
  19. }