UNPKG

@mono.co/prove-react-native

Version:

The Mono Prove SDK is a quick and secure way to onboard your users from within your React Native app.

67 lines (66 loc) 1.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _reactNative = require("react-native"); var _react = _interopRequireDefault(require("react")); var _useMonoProve = _interopRequireDefault(require("./use-mono-prove.js")); var _jsxRuntime = require("react/jsx-runtime"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } const MonoProveButton = () => { const { init } = (0, _useMonoProve.default)(); let Btn; function onPress() { init(); } if (_reactNative.Platform.OS === 'ios') { Btn = _reactNative.TouchableOpacity; } else { Btn = _reactNative.TouchableNativeFeedback; } return /*#__PURE__*/(0, _jsxRuntime.jsx)(Btn, { onPress, style: { width: '100%' }, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { style: styles.button, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, { style: styles.label, children: "Onboard with Mono Prove" }) }) }); }; const styles = _reactNative.StyleSheet.create({ button: { height: 60, justifyContent: 'center', alignItems: 'center', flexDirection: 'row', marginBottom: 16, paddingVertical: 8, paddingHorizontal: 16, borderRadius: 5, shadowColor: 'black', shadowOffset: { width: 0, height: 0 }, shadowOpacity: 0.18, shadowRadius: 2, backgroundColor: '#0055BA', opacity: 1 }, label: { fontSize: 17, lineHeight: 22, color: 'white', textAlign: 'center' } }); var _default = exports.default = MonoProveButton; //# sourceMappingURL=mono-prove-button.js.map