omnipay-savings-sdk
Version:
Omnipay Savings SDK
38 lines (37 loc) • 1.94 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HomeNavigationCard = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_native_1 = require("react-native");
const Button_1 = require("../Button");
const utils_1 = require("../../utils");
const Text_1 = require("../Text");
const HomeNavigationCard = ({ title, // the title of the card
backgroundColor, // the background color of the card
onPress, // called when the card is pressed
topComponent, //
icon, // the icon of the card
containerStyle, // additional styles for the card container
}) => {
return ((0, jsx_runtime_1.jsxs)(Button_1.CustomPressable, Object.assign({ onPress: onPress, style: [
utils_1.globalStyles.colBetween,
styles.navigationCardContainer,
{
backgroundColor: backgroundColor,
},
containerStyle,
], activeOpacity: onPress ? 0.9 : 1 }, { children: [topComponent !== null && topComponent !== void 0 ? topComponent : topComponent, (0, jsx_runtime_1.jsxs)(react_native_1.View, Object.assign({ style: [utils_1.globalStyles.colCenter, { rowGap: (0, utils_1.ms)(7.5) }] }, { children: [icon !== null && icon !== void 0 ? icon : icon, (0, jsx_runtime_1.jsx)(Text_1.Text, { color: utils_1.Colors.chooseAccountTypeText, fontWeight: "500", fontFamily: 'Gordita-Medium', fontSize: (0, utils_1.fontSz)(12), text: title !== null && title !== void 0 ? title : '' })] }))] })));
};
exports.HomeNavigationCard = HomeNavigationCard;
const styles = react_native_1.StyleSheet.create({
navigationCardContainer: {
alignItems: 'center',
width: '31.5%',
minHeight: (0, utils_1.ms)(105),
borderRadius: (0, utils_1.ms)(4),
marginVertical: (0, utils_1.hp)(6),
marginBottom: (0, utils_1.hp)(12),
paddingVertical: (0, utils_1.ms)(10),
paddingBottom: (0, utils_1.ms)(20),
},
});