react-native-ios-utilities
Version:
Utilities for react-native + iOS and wrappers for using swift together with fabric/paper + JSI
56 lines (55 loc) • 2.24 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.CardRowLabelDisplay = CardRowLabelDisplay;
var React = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
var _Colors = require("../misc/Colors.js");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
/**
* ```
* ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
* Label Value │
* └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─
* ```
*/
function CardRowLabelDisplay(props) {
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
style: styles.cardRowLabelDisplayContainer,
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
style: styles.cardRowLabelDisplayLabelText,
children: props.label ?? 'Current Value'
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
style: styles.cardRowLabelDisplayValueText,
children: props.value ?? 'N/A'
})]
});
}
;
const styles = _reactNative.StyleSheet.create({
cardRowLabelDisplayContainer: {
flexDirection: 'row',
marginTop: 12,
paddingHorizontal: 12,
paddingVertical: 5,
backgroundColor: _Colors.Colors.INDIGO[100],
borderRadius: 10,
alignItems: 'center',
justifyContent: 'space-between'
},
cardRowLabelDisplayLabelText: {
fontSize: 12,
fontWeight: '500',
color: _Colors.Colors.PURPLE[1100],
opacity: 0.75
},
cardRowLabelDisplayValueText: {
fontSize: 12,
fontWeight: '500',
color: _Colors.Colors.PURPLE[1100],
opacity: 0.4
}
});
//# sourceMappingURL=CardRowLabelDisplay.js.map