Skip to content

Commit

Permalink
fix: Add gradient to Galleries for You banner (#9058)
Browse files Browse the repository at this point in the history
  • Loading branch information
olerichter00 authored Jul 26, 2023
1 parent 078f41c commit 2e8417b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/Scenes/Home/Components/GalleriesForYouBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import { navigate } from "app/system/navigation/navigate"
import { isPad } from "app/utils/hardware"
import { Image } from "react-native"
import LinearGradient from "react-native-linear-gradient"
import { useTracking } from "react-tracking"

const IMAGE_ASPECT_RATIO = 0.74
Expand Down Expand Up @@ -41,6 +42,17 @@ export const GalleriesForYouBanner: React.FC<GalleriesForYouBannerProps> = ({ mb
style={{ width: width, height: width / IMAGE_ASPECT_RATIO }}
resizeMode={isTablet ? "contain" : "cover"}
/>
<LinearGradient
colors={["rgba(0, 0, 0, 0)", "rgba(0, 0, 0, 0.5)"]}
start={{ x: 0, y: 0 }}
end={{ x: 0, y: 1 }}
style={{
position: "absolute",
width: "100%",
height: "40%",
bottom: 0,
}}
/>
</Flex>

<Flex justifyContent="flex-end" height="100%" px={2} pb={2}>
Expand Down

0 comments on commit 2e8417b

Please sign in to comment.