Description: Function that exposes Modalfy's API outside of React's context. Notes: - Do not use if you're inside a React component. Consider useModal() or withModal() instead. - Cannot pass a modalName to closeModal() to close a modal that's not the currently displayed one due to API limitations. Returns: An object covered in ModalProp (UsableModalProp
in TypeScript). Properties of the returned object: - closeAllModals: () => void Description: Closes all currently open modals. - closeModal: () => void Description: Closes the currently displayed modal. - closeModals: (modalName: M) => void Description: Closes all modals with the specified name. Parameters: - modalName: M (keyof P) Description: The name of the modal to close. - currentModal: ModalState
['currentModal'] Description: Provides access to the currently displayed modal's state. - openModal: (modalName: M, params?: P[M]) => void Description: Opens a new modal with the specified name and optional parameters. Parameters: - modalName: M (keyof P) Description: The name of the modal to open. - params?: P[M] Description: Optional parameters to pass to the modal component. ```