1 import { useCallback, useState } from 'react';
3 import useModalState from '@proton/components/components/modalTwo/useModalState';
5 function useEditorModal<P>() {
6 const [modalsStateProps, openModal, render] = useModalState();
7 const [modalProps, setModalProps] = useState<P>();
9 const showModal = useCallback((props: P) => {
14 return { showCallback: showModal, props: modalProps, modalsStateProps, render };
17 export default useEditorModal;