From 46b119e2d3bd5cfdedf0a97b8e12663aabc2b1c7 Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Fri, 9 Aug 2024 18:46:15 +0200 Subject: [PATCH] fix: remove scrollbar + improve component props --- components/common/HorrizontalScroll.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/components/common/HorrizontalScroll.tsx b/components/common/HorrizontalScroll.tsx index 6aa48a5f..25f6c30b 100644 --- a/components/common/HorrizontalScroll.tsx +++ b/components/common/HorrizontalScroll.tsx @@ -1,7 +1,13 @@ import React from "react"; -import { ScrollView, View, ViewStyle, ActivityIndicator } from "react-native"; +import { + ScrollView, + View, + ViewStyle, + ActivityIndicator, + ScrollViewProps, +} from "react-native"; -interface HorizontalScrollProps { +interface HorizontalScrollProps extends ScrollViewProps { data?: T[] | null; renderItem: (item: T, index: number) => React.ReactNode; containerStyle?: ViewStyle; @@ -15,6 +21,7 @@ export function HorizontalScroll({ containerStyle, contentContainerStyle, loadingContainerStyle, + ...props }: HorizontalScrollProps): React.ReactElement { if (!data) { return ( @@ -34,6 +41,8 @@ export function HorizontalScroll({ horizontal style={containerStyle} contentContainerStyle={contentContainerStyle} + showsHorizontalScrollIndicator={false} + {...props} > {data.map((item, index) => (