# All files / composer/__legacy-buffer-web-shared-components__/modal actionCreators.js

50% Statements 2/4
100% Branches 0/0
0% Functions 0/2
50% Lines 2/4

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19

    10x

    10x
     import AppDispatcher from '../../dispatcher';
    import ActionTypes from './actionTypes';

    const ActionCreators = {
      closeModal: (element) => AppDispatcher.handleViewAction({
        actionType: ActionTypes.CLOSE_MODAL,
        element
      }),

      openModal: (name, props) => AppDispatcher.handleViewAction({
        actionType: ActionTypes.OPEN_MODAL,
        name,
        props,
      }),
    };

    module.exports = ActionCreators;