Download mobile/src/components/ui/BackgroundGradient.tsx from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 618 Bytes
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/src/components/ui/BackgroundGradient.tsx
- Command line
-
hf download hf://Anirudh1950/MentraOS/mobile/src/components/ui/BackgroundGradient.tsx
-
curl -L -o BackgroundGradient.tsx https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/src/components/ui/BackgroundGradient.tsx
618 Bytes
| import {LinearGradient} from "expo-linear-gradient" | |
| import {useAppTheme} from "@/contexts/ThemeContext" | |
| export default function BackgroundGradient({children, colors}: {children: React.ReactNode; colors?: [string, string]}) { | |
| const {theme} = useAppTheme() | |
| return ( | |
| <LinearGradient | |
| colors={colors ?? [theme.colors.backgroundStart, theme.colors.backgroundEnd]} | |
| style={{ | |
| position: "absolute", | |
| left: 0, | |
| right: 0, | |
| top: 0, | |
| bottom: 0, | |
| }} | |
| start={{x: 0, y: 1}} | |
| end={{x: 0, y: 0}}> | |
| {children} | |
| </LinearGradient> | |
| ) | |
| } | |