omnipay-savings-sdk
Version:
Omnipay Savings SDK
40 lines (39 loc) • 1.73 kB
JavaScript
;
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Text = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const react_native_1 = require("react-native");
const utils_1 = require("../../utils");
exports.Text = (0, react_1.memo)((_a) => {
var { text, fontSize = (0, utils_1.fontSz)(15), lineHeight, numberOfLines = 0, onPress, textAlign, color = utils_1.Colors.black, fontWeight = '400', fontFamily = 'Gordita-Regular', textDecorationLine = 'none', style } = _a, rest = __rest(_a, ["text", "fontSize", "lineHeight", "numberOfLines", "onPress", "textAlign", "color", "fontWeight", "fontFamily", "textDecorationLine", "style"]);
const propsStyle = (0, react_1.useMemo)(() => ({
color,
fontSize,
textAlign,
lineHeight,
fontWeight,
fontFamily,
textDecorationLine,
}), [
color,
textAlign,
textDecorationLine,
fontWeight,
fontFamily,
lineHeight,
fontSize,
]);
return ((0, jsx_runtime_1.jsx)(react_native_1.Text, Object.assign({ numberOfLines: numberOfLines, onPress: onPress, style: [propsStyle, style] }, rest, { children: text })));
});