mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
added context menu for album view
This commit is contained in:
@@ -6,13 +6,24 @@ import { AndroidImageColors } from 'react-native-image-colors/lib/typescript/typ
|
||||
import colors from '@app/styles/colors'
|
||||
import GradientBackground from '@app/components/GradientBackground'
|
||||
|
||||
const ImageGradientBackground: React.FC<{
|
||||
export type ImageGradientBackgroundProps = {
|
||||
height?: number | string
|
||||
width?: number | string
|
||||
position?: 'relative' | 'absolute'
|
||||
style?: ViewStyle
|
||||
imagePath?: string
|
||||
}> = ({ height, width, position, style, imagePath, children }) => {
|
||||
onGetColor?: (color: string) => void
|
||||
}
|
||||
|
||||
const ImageGradientBackground: React.FC<ImageGradientBackgroundProps> = ({
|
||||
height,
|
||||
width,
|
||||
position,
|
||||
style,
|
||||
imagePath,
|
||||
children,
|
||||
onGetColor,
|
||||
}) => {
|
||||
const [highColor, setHighColor] = useState<string>(colors.gradient.high)
|
||||
const navigation = useNavigation()
|
||||
|
||||
@@ -60,6 +71,10 @@ const ImageGradientBackground: React.FC<{
|
||||
})
|
||||
}, [navigation, highColor])
|
||||
|
||||
useEffect(() => {
|
||||
onGetColor && onGetColor(highColor)
|
||||
}, [onGetColor, highColor])
|
||||
|
||||
return (
|
||||
<GradientBackground
|
||||
height={height}
|
||||
|
||||
Reference in New Issue
Block a user