mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
home screen first pass
This commit is contained in:
@@ -31,7 +31,7 @@ const AlbumArt: React.FC<AlbumArtProps> = ({ id, height, width }) => {
|
||||
PlaceholderComponent={Placeholder}
|
||||
height={height}
|
||||
width={width}
|
||||
coverArtUri={width > 128 ? albumArt?.uri : albumArt?.thumbUri}
|
||||
coverArtUri={width > 200 ? albumArt?.uri : albumArt?.thumbUri}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -4,6 +4,7 @@ import { LayoutRectangle, Pressable, PressableProps } from 'react-native'
|
||||
type PressableOpacityProps = PressableProps & {
|
||||
ripple?: boolean
|
||||
rippleColor?: string
|
||||
unstable_pressDelay?: number
|
||||
}
|
||||
|
||||
const PressableOpacity: React.FC<PressableOpacityProps> = props => {
|
||||
|
||||
Reference in New Issue
Block a user