Open History to see the last commit
1import { Platform } from "react-native";
2
3import { useResolveClassNames } from "uniwind";
4import { SymbolView } from "./AppSymbol";
5import { ListRowLayout, type ListRowContentProps } from "./ListRowLayout";
6import { RowPressable } from "./RowPressable";
7
8export function ListRow(props: ListRowContentProps & { readonly onPress: () => void }) {
9 const rippleStyle = useResolveClassNames("bg-subtle-strong");
10 return (
11 <RowPressable
12 accessibilityRole="button"
13 accessibilityLabel={[props.label, props.description, props.detail].filter(Boolean).join(", ")}
14 accessibilityState={{ disabled: Boolean(props.disabled) }}
15 disabled={props.disabled}
16 onPress={props.onPress}
17 android_ripple={{ color: rippleStyle.backgroundColor }}
18 unstable_pressDelay={Platform.OS === "android" ? 50 : undefined}
19 className="bg-grouped-card"
20 >
21 <ListRowLayout
22 {...props}
23 accessory={
24 <SymbolView
25 name="chevron.right"
26 size={16}
27 tintColorClassName="accent-chevron"
28 type="monochrome"
29 weight="semibold"
30 />
31 }
32 />
33 </RowPressable>
34 );
35}