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.

56 lines (55 loc) 1.33 kB
"use strict"; import React from 'react'; import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime"; const Error = props => { const { name, setOpenWidget } = props; return /*#__PURE__*/_jsxs(View, { style: styles.errorScreen, children: [/*#__PURE__*/_jsxs(Text, { style: styles.errorMessage, children: [name, ": Something went wrong. Try again."] }), /*#__PURE__*/_jsx(View, { style: styles.btnContainer, children: /*#__PURE__*/_jsx(TouchableOpacity, { style: styles.btn, onPress: () => setOpenWidget(false), children: /*#__PURE__*/_jsx(Text, { children: "Close" }) }) })] }); }; const styles = StyleSheet.create({ btnContainer: { marginTop: 5 }, btn: { width: '100%', borderRadius: 5, backgroundColor: '#E4E7EB', padding: 10, alignItems: 'center', justifyContent: 'center', marginBottom: 10 }, errorScreen: { display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100%', backgroundColor: 'white' }, errorMessage: { color: 'red', fontSize: 16, textAlign: 'center', paddingHorizontal: 20 } }); export default Error; //# sourceMappingURL=error.js.map