Update expo application
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
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>
|
||||
);
|
||||
Reference in New Issue
Block a user