UNPKG

mh-rn-component

Version:

19 lines (17 loc) 640 B
import React from 'react'; import { View } from 'react-native'; import { ToastProvider, useToast, ToastRef } from '../Toast/useToast'; import { DialogProvider } from '../Dialog/useDialog'; const InitializeToastRef = () => { const toast = useToast(); ToastRef.current = toast; return null; }; export default (props => { return /*#__PURE__*/React.createElement(View, { style: { flex: 1 } }, /*#__PURE__*/React.createElement(DialogProvider, null, /*#__PURE__*/React.createElement(ToastProvider, null, props.children, /*#__PURE__*/React.createElement(InitializeToastRef, null)))); }); //# sourceMappingURL=index.js.map