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

33.33% Statements 1/3
100% Branches 0/0
0% Functions 0/2
33.33% Lines 1/3

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

    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,
      }),
    };

    export default ActionCreators;