UNPKG

omnipay-savings-sdk

Version:

Omnipay Savings SDK

28 lines (27 loc) 2.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("react/jsx-runtime"); const react_native_1 = require("react-native"); const modal_1 = require("../Common/modal"); const SmartImage_1 = require("../Images/SmartImage"); const Button_1 = require("../Button"); const constants_1 = require("../../utils/constants"); const colors_1 = require("../../utils/colors"); const Text_1 = require("../Text"); const Notification = (props) => { const { onClose, image, title, description, buttonText, onButtonPress, minHeight = (0, constants_1.ms)(280) } = props; return ((0, jsx_runtime_1.jsxs)(modal_1.Modal, Object.assign({ visible: true, onClose: onClose, containerStyle: { paddingHorizontal: (0, constants_1.ms)(20), paddingVertical: (0, constants_1.ms)(30), minHeight } }, { children: [(0, jsx_runtime_1.jsx)(react_native_1.View, Object.assign({ style: { flexDirection: 'column', justifyContent: 'center', alignItems: 'center', marginBottom: (0, constants_1.ms)(20), } }, { children: (0, jsx_runtime_1.jsx)(SmartImage_1.SmartImage, { source: image, style: { height: (0, constants_1.ms)(70), resizeMode: 'contain' } }) })), (0, jsx_runtime_1.jsx)(Text_1.Text, { style: { color: colors_1.Colors.payLaterHeaderText, }, fontWeight: "600", fontFamily: 'Gordita-Medium', textAlign: 'center', fontSize: (0, constants_1.fontSz)(16), text: title }), (0, jsx_runtime_1.jsx)(Text_1.Text, { style: { color: colors_1.Colors.lightBaseBlueText, paddingVertical: (0, constants_1.ms)(10), }, fontWeight: "400", fontFamily: 'Gordita-Regular', textAlign: 'center', fontSize: (0, constants_1.fontSz)(13), text: description, lineHeight: (0, constants_1.fontSz)(20) }), onButtonPress && buttonText && ((0, jsx_runtime_1.jsx)(Button_1.Button, { title: buttonText, onPress: () => { onButtonPress(); }, style: { marginBottom: (0, constants_1.ms)(20) }, disabled: false }))] }))); }; exports.default = Notification;