@lad-tech/mobydick-core
Version:
React Native components library focused on usability, accessibility and developer experience
20 lines (15 loc) • 410 B
text/typescript
import {createRef} from 'react';
import {IModalRef} from './types';
export const modalRef = createRef<IModalRef>();
const MobyDickPopup: IModalRef = {
openPopup: props => {
return modalRef.current?.openPopup(props) as string;
},
closePopup: id => {
modalRef.current?.closePopup(id);
},
closeAllPopups: () => {
modalRef.current?.closeAllPopups();
},
};
export default MobyDickPopup;