Bluesky app fork with some witchin' additions 馃挮
at readme-update 24 lines 720 B view raw
1import {LinearGradient} from 'expo-linear-gradient' 2 3import {atoms as a, useTheme, utils, type ViewStyleProp} from '#/alf' 4 5/** 6 * A gradient overlay using the primary color at low opacity. This component is 7 * absolutely positioned and intended to be composed within other components, 8 * with optional styling allowed, such as adjusting border radius. 9 */ 10export function Gradient({style}: ViewStyleProp) { 11 const t = useTheme() 12 return ( 13 <LinearGradient 14 colors={[ 15 utils.alpha(t.palette.primary_500, 0.2), 16 utils.alpha(t.palette.primary_500, 0.1), 17 ]} 18 locations={[0, 1]} 19 start={{x: 0, y: 0}} 20 end={{x: 1, y: 0}} 21 style={[a.absolute, a.inset_0, style]} 22 /> 23 ) 24}