diff --git a/js/app/components/ui/gradient.tsx b/js/app/components/ui/gradient.tsx index a2fb2f87..6bedb7b5 100644 --- a/js/app/components/ui/gradient.tsx +++ b/js/app/components/ui/gradient.tsx @@ -2,15 +2,21 @@ // Posted by TOPKAT, modified by community. See post 'Timeline' for change history // Retrieved 2026-02-18, License - CC BY-SA 4.0 -import { DimensionValue, StyleSheet, View, ViewProps } from "react-native"; +import { StyleSheet, View, ViewProps } from "react-native"; import Animated from "react-native-reanimated"; -import Svg, { Defs, LinearGradient, Rect, Stop } from "react-native-svg"; +import Svg, { + Defs, + LinearGradient, + NumberProp, + Rect, + Stop, +} from "react-native-svg"; type GradientProps = { fromColor: string; toColor: string; children?: any; - height?: DimensionValue; + height?: NumberProp; opacityColor1?: number; opacityColor2?: number; } & ViewProps; @@ -22,6 +28,7 @@ function Gradient({ height = "100%", opacityColor1 = 1, opacityColor2 = 1, + style, ...otherViewProps }: GradientProps) { const gradientUniqueId = `grad${fromColor}+${toColor}`.replace( @@ -29,46 +36,35 @@ function Gradient({ "", ); return ( - <> - + - - - - - - - - - - + + + + + + + + {children} - + ); }