Files
spoon/apps/expo/src/components/ui/list-row.tsx
T
Gabriel Brown 42f95530de
Build and Push Next App / quality (push) Successful in 1m27s
Build and Push Next App / build-next (push) Successful in 3m58s
Update expo application
2026-06-22 12:13:02 -04:00

37 lines
992 B
TypeScript

import type { ComponentProps, ReactNode } from 'react';
import { Pressable, Text, View } from 'react-native';
export const ListRow = ({
title,
subtitle,
meta,
children,
onPress,
...props
}: {
title: string;
subtitle?: string;
meta?: string;
children?: ReactNode;
onPress?: () => void;
} & Omit<ComponentProps<typeof Pressable>, 'children'>) => (
<Pressable
className='border-border bg-card rounded-lg border p-4'
onPress={onPress}
{...props}
>
<View className='flex-row items-start justify-between gap-3'>
<View className='min-w-0 flex-1'>
<Text className='text-foreground font-semibold'>{title}</Text>
{subtitle ? (
<Text className='text-muted-foreground mt-1 text-sm'>{subtitle}</Text>
) : null}
</View>
{meta ? (
<Text className='text-muted-foreground text-xs'>{meta}</Text>
) : null}
</View>
{children ? <View className='mt-3'>{children}</View> : null}
</Pressable>
);