From 6ee48ffb9d628a04c487b73b222be76241ff3ec4 Mon Sep 17 00:00:00 2001 From: Mohamed Bassem Date: Mon, 29 Dec 2025 10:23:36 +0200 Subject: feat(mobile): make the settings menu look more native (#2307) * feat(mobile): make the settings menu look more native * more fixes * review comments --- apps/mobile/components/ui/List.tsx | 41 +++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 16 deletions(-) (limited to 'apps/mobile/components/ui/List.tsx') diff --git a/apps/mobile/components/ui/List.tsx b/apps/mobile/components/ui/List.tsx index 52ff5779..67f0a9af 100644 --- a/apps/mobile/components/ui/List.tsx +++ b/apps/mobile/components/ui/List.tsx @@ -29,7 +29,9 @@ cssInterop(FlashList, { type ListDataItem = string | { title: string; subTitle?: string }; type ListVariant = "insets" | "full-width"; -type ListRef = React.Ref>; +type ListRef = React.Ref< + React.ComponentRef> +>; type ListRenderItemProps = ListRenderItemInfo & { variant?: ListVariant; @@ -76,17 +78,20 @@ const rootVariants = cva("min-h-2 flex-1", { }, }); -function ListComponent({ - variant = "full-width", - rootClassName, - rootStyle, - contentContainerClassName, - renderItem, - data, - sectionHeaderAsGap = false, - contentInsetAdjustmentBehavior = "automatic", - ...props -}: ListProps) { +function ListComponent( + { + variant = "full-width", + rootClassName, + rootStyle, + contentContainerClassName, + renderItem, + data, + sectionHeaderAsGap = false, + contentInsetAdjustmentBehavior = "automatic", + ...props + }: ListProps, + ref: ListRef, +) { const insets = useSafeAreaInsets(); return ( ({ style={rootStyle} > ( {!!leftView && {leftView}} ( {item.title} @@ -343,7 +348,11 @@ function ListItemComponent( )} - {!!rightView && {rightView}} + {!!rightView && ( + + {rightView} + + )} -- cgit v1.2.3-70-g09d2