jiti-meet/react/features/base/modal/actions.js

22 lines
554 B
JavaScript
Raw Normal View History

2020-03-30 15:26:15 +00:00
// @flow
import { SET_ACTIVE_MODAL_ID } from './actionTypes';
/**
* Action to set the ID of the active modal (or undefined if needs to be hidden).
*
* @param {string} activeModalId - The new modal ID or undefined.
* @param {Object} modalProps - The props to pass to the modal.
2020-03-30 15:26:15 +00:00
* @returns {{
* activeModalId: string,
* type: SET_ACTIVE_MODAL_ID
* }}
*/
export function setActiveModalId(activeModalId: ?string, modalProps: Object = {}) {
2020-03-30 15:26:15 +00:00
return {
activeModalId,
modalProps,
2020-03-30 15:26:15 +00:00
type: SET_ACTIVE_MODAL_ID
};
}