UNPKG

@complycube/react-native

Version:

ComplyCube's React Native Mobile SDK library for Identity Verification, KYC, and AML

33 lines (32 loc) 1.22 kB
// @ts-nocheck import * as React from 'react'; import { requireNativeComponent, UIManager, findNodeHandle, View } from 'react-native'; // Extend the UIManager with the commands we need let ComplyCubeComponent = requireNativeComponent('ComplyCubeComponent'); console.log("ddddd", UIManager === null || UIManager === void 0 ? void 0 : UIManager.ComplyCubeComponent); const createFragment = viewId => UIManager.dispatchViewManagerCommand(viewId, // we are calling the 'create' command UIManager === null || UIManager === void 0 ? void 0 : UIManager.ComplyCubeComponent.Commands.create.toString(), // 1, [viewId]); console.log('ComplyCubeView: ', ComplyCubeComponent); export default function ComplyCubeAndroid(_ref) { let { settings } = _ref; const ref = React.useRef(null); React.useEffect(() => { // console.log(ref); const viewId = findNodeHandle(ref.current); createFragment(viewId); }, []); return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement(ComplyCubeComponent, { ref: ref, settings: settings, style: { height: 10, width: 10 } })); } export { ComplyCubeComponent }; //# sourceMappingURL=ComplyCubeComponentAndroid.js.map