omnipay-savings-sdk
Version:
Omnipay Savings SDK
46 lines (45 loc) • 1.9 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Box = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const react_native_1 = require("react-native");
const Box = (props) => {
const { marginHorizontal = 0, marginVertical = 0, paddingHorizontal = 0, paddingVertical = 0, zIndex = 99999, } = props;
const { children, paddingTop = paddingVertical, paddingBottom = paddingVertical, marginBottom = marginVertical, marginTop = marginVertical, paddingRight = paddingHorizontal, paddingLeft = paddingHorizontal, marginRight = marginHorizontal, marginLeft = marginHorizontal, borderRadius = 0, flexDirection = 'column', justifyContent = 'flex-start', alignItems = 'flex-start', backgroundColor = 'transparent', height, width = '100%', flex, onPress, position, top, left, right, bottom, borderBottomColor, borderTopColor, borderBottomWidth, borderTopWidth, borderColor, borderWidth, maxWidth, } = props;
const boxStyles = {
marginTop,
marginBottom,
paddingTop,
paddingBottom,
paddingRight,
paddingLeft,
marginRight,
marginLeft,
borderRadius,
flexDirection,
justifyContent,
alignItems,
height,
width,
backgroundColor,
flex,
position,
left,
bottom,
right,
top,
borderBottomColor,
borderTopColor,
borderBottomWidth,
borderTopWidth,
borderColor,
borderWidth,
maxWidth,
zIndex,
};
if (onPress) {
return ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, Object.assign({ style: boxStyles, onPress: onPress, activeOpacity: 0.8 }, { children: children })));
}
return (0, jsx_runtime_1.jsx)(react_native_1.View, Object.assign({ style: boxStyles }, { children: children }));
};
exports.Box = Box;