mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
1import React from 'react' 2import {LinearGradient} from 'expo-linear-gradient' 3 4import {atoms as a, tokens} from '#/alf' 5 6export function GradientFill({ 7 gradient, 8}: { 9 gradient: 10 | typeof tokens.gradients.sky 11 | typeof tokens.gradients.midnight 12 | typeof tokens.gradients.sunrise 13 | typeof tokens.gradients.sunset 14 | typeof tokens.gradients.bonfire 15 | typeof tokens.gradients.summer 16 | typeof tokens.gradients.nordic 17}) { 18 return ( 19 <LinearGradient 20 colors={gradient.values.map(c => c[1])} 21 locations={gradient.values.map(c => c[0])} 22 start={{x: 0, y: 0}} 23 end={{x: 1, y: 1}} 24 style={[a.absolute, a.inset_0]} 25 /> 26 ) 27}