@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.
61 lines (60 loc) • 1.67 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _reactNative = require("react-native");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const Error = props => {
const {
name,
setOpenWidget
} = props;
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
style: styles.errorScreen,
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
style: styles.errorMessage,
children: [name, ": Something went wrong. Try again."]
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
style: styles.btnContainer,
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
style: styles.btn,
onPress: () => setOpenWidget(false),
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
children: "Close"
})
})
})]
});
};
const styles = _reactNative.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
}
});
var _default = exports.default = Error;
//# sourceMappingURL=error.js.map