UNPKG

1.36 kBJavaScriptView Raw
1var __rest = (this && this.__rest) || function (s, e) {
2 var t = {};
3 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4 t[p] = s[p];
5 if (s != null && typeof Object.getOwnPropertySymbols === "function")
6 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8 t[p[i]] = s[p[i]];
9 }
10 return t;
11};
12import React from 'react';
13import { Platform, StyleSheet } from 'react-native';
14import normalize from '../helpers/normalizeText';
15import { fonts, withTheme } from '../config';
16import Text from '../text/Text';
17const CardTitle = (_a) => {
18 var _b;
19 var { style, theme } = _a, props = __rest(_a, ["style", "theme"]);
20 return (<Text testID="cardTitle" style={StyleSheet.flatten([
21 Object.assign(Object.assign({ fontSize: normalize(14), color: (_b = theme === null || theme === void 0 ? void 0 : theme.colors) === null || _b === void 0 ? void 0 : _b.grey1 }, Platform.select({
22 android: Object.assign({}, fonts.android.black),
23 default: {
24 fontWeight: 'bold',
25 },
26 })), { textAlign: 'center', marginBottom: 15 }),
27 style,
28 ])} {...props}/>);
29};
30export default withTheme(CardTitle, 'CardTitle');
31
\No newline at end of file