added context menu for album view

This commit is contained in:
austinried
2021-08-20 09:32:06 +09:00
parent 12cbe842ce
commit e69555f05c
5 changed files with 92 additions and 43 deletions

View File

@@ -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}