import React from 'react' ; import { Platform } from 'react-native' ; const getAbsoluteChildren = ( children , reverse ? ) => { let childrenArray = React . Children . toArray ( children ) ; if ( reverse ) { childrenArray = childrenArray . reverse ( ) ; } const trailingChildrenWithSpacing = childrenArray . map ( ( child ) => { return React . cloneElement ( child , Platform . OS === 'web' ? { style : { position : 'absolute' } } : { position : 'absolute' } , child . props . children ) ; } ) ; return [ trailingChildrenWithSpacing ] ; } ; export default getAbsoluteChildren ;