import React, { useState } from 'react' import { LayoutRectangle, ScrollView, ScrollViewProps } from 'react-native' import colors from '@app/styles/colors' import ImageGradientBackground from '@app/components/ImageGradientBackground' const ImageGradientScrollView: React.FC = props => { const [layout, setLayout] = useState(undefined) props.style = props.style || {} if (typeof props.style === 'object' && props.style !== null) { props.style = { ...props.style, backgroundColor: colors.gradient.low, } } return ( { setLayout(event.nativeEvent.layout) }}> {props.children} ) } export default ImageGradientScrollView