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.

62 lines (61 loc) 1.37 kB
"use strict"; import { View, Text, StyleSheet, TouchableOpacity, TouchableNativeFeedback, Platform } from 'react-native'; import React from 'react'; import useMonoProve from "./use-mono-prove.js"; import { jsx as _jsx } from "react/jsx-runtime"; const MonoProveButton = () => { const { init } = useMonoProve(); let Btn; function onPress() { init(); } if (Platform.OS === 'ios') { Btn = TouchableOpacity; } else { Btn = TouchableNativeFeedback; } return /*#__PURE__*/_jsx(Btn, { onPress, style: { width: '100%' }, children: /*#__PURE__*/_jsx(View, { style: styles.button, children: /*#__PURE__*/_jsx(Text, { style: styles.label, children: "Onboard with Mono Prove" }) }) }); }; const styles = 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' } }); export default MonoProveButton; //# sourceMappingURL=mono-prove-button.js.map