From f089f4578131e83cd177b7809ce0f7b75779dfdc Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Fri, 21 Jun 2024 21:38:04 -0700
Subject: Starter Packs (#4332)

Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Co-authored-by: Eric Bailey <git@esb.lol>
Co-authored-by: Samuel Newman <mozzius@protonmail.com>
---
 src/components/LinearGradientBackground.tsx | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 src/components/LinearGradientBackground.tsx

(limited to 'src/components/LinearGradientBackground.tsx')

diff --git a/src/components/LinearGradientBackground.tsx b/src/components/LinearGradientBackground.tsx
new file mode 100644
index 000000000..f516b19f5
--- /dev/null
+++ b/src/components/LinearGradientBackground.tsx
@@ -0,0 +1,23 @@
+import React from 'react'
+import {StyleProp, ViewStyle} from 'react-native'
+import {LinearGradient} from 'expo-linear-gradient'
+
+import {gradients} from '#/alf/tokens'
+
+export function LinearGradientBackground({
+  style,
+  children,
+}: {
+  style: StyleProp<ViewStyle>
+  children: React.ReactNode
+}) {
+  const gradient = gradients.sky.values.map(([_, color]) => {
+    return color
+  })
+
+  return (
+    <LinearGradient colors={gradient} style={style}>
+      {children}
+    </LinearGradient>
+  )
+}
-- 
cgit 1.4.1

