UNPKG

react-native-pager-view

Version:
22 lines (21 loc) 695 B
"use strict"; import React, { Children } from 'react'; import { StyleSheet, View } from 'react-native'; import { jsx as _jsx } from "react/jsx-runtime"; export const childrenWithOverriddenStyle = (children, pageMargin = 0) => { return Children.map(children, child => { const element = child; return /*#__PURE__*/_jsx(View, { style: [StyleSheet.absoluteFill, { marginRight: pageMargin / 2, marginLeft: pageMargin / 2 }], collapsable: false, children: /*#__PURE__*/React.cloneElement(element, { ...element.props, style: [element.props.style, StyleSheet.absoluteFill] }) }); }); }; //# sourceMappingURL=utils.ios.js.map