UNPKG

omnipay-savings-sdk

Version:

Omnipay Savings SDK

25 lines (24 loc) 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CustomText = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const react_native_1 = require("react-native"); const CustomText = ({ fontSize = 16, fontWeight = '400', padding = 0, paddingLeft = 0, paddingRight = 0, paddingBottom = 0, paddingTop = 0, textAlign, lineHeight, children, color = '#425466', opacity = 1, onPress, textTransform, }) => { const textStyles = Object.assign(Object.assign({ fontFamily: fontWeight === '500' ? 'Gordita-Medium' : fontWeight === '600' ? 'Gordita-Bold' : 'Gordita-Regular', fontSize: fontSize, fontWeight, padding, paddingLeft, paddingRight, paddingBottom, paddingTop, textAlign, lineHeight: lineHeight || fontSize * 1.4 }, (color && { color })), { opacity, textTransform }); if (onPress) { return ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, Object.assign({ onPress: onPress, activeOpacity: 0.8 }, { children: (0, jsx_runtime_1.jsx)(react_native_1.Text, Object.assign({ style: textStyles }, { children: children })) }))); } return (0, jsx_runtime_1.jsx)(react_native_1.Text, Object.assign({ style: textStyles }, { children: children })); }; exports.CustomText = CustomText;