home screen first pass

This commit is contained in:
austinried
2021-07-09 14:34:15 +09:00
parent f4e167debc
commit d245d4b786
8 changed files with 296 additions and 25 deletions

View File

@@ -1,14 +1,20 @@
import React from 'react'
import { ScrollView, ScrollViewProps, ViewStyle } from 'react-native'
import colors from '@app/styles/colors'
import GradientBackground from '@app/components/GradientBackground'
import colors from '@app/styles/colors'
import dimensions from '@app/styles/dimensions'
import React from 'react'
import { ScrollView, ScrollViewProps, useWindowDimensions } from 'react-native'
const GradientScrollView: React.FC<ScrollViewProps> = props => {
props.style = props.style || {}
;(props.style as ViewStyle).backgroundColor = colors.gradient.low
const layout = useWindowDimensions()
const minHeight = layout.height - (dimensions.top() + dimensions.bottom())
return (
<ScrollView overScrollMode="never" {...props}>
<ScrollView
overScrollMode="never"
{...props}
style={[props.style, { backgroundColor: colors.gradient.low }]}
contentContainerStyle={[props.contentContainerStyle, { minHeight }]}>
<GradientBackground />
{props.children}
</ScrollView>