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