Skip to content

Commit 7acb895

Browse files
refactor(mobile): use shared open source license rows
1 parent 1d2a6c4 commit 7acb895

1 file changed

Lines changed: 8 additions & 26 deletions

File tree

‎apps/mobile/src/features/settings/SettingsOpenSourceLicensesRouteScreen.tsx‎

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
1515

1616
import { SymbolView } from "../../components/ui/AppSymbol";
1717
import { AppText as Text, AppTextInput as TextInput } from "../../components/ui/AppText";
18+
import { ListRow } from "../../components/ui/ListRow";
1819
import { SettingsScreen } from "./components/SettingsScreen";
1920
import { NativeStackScreenOptions } from "../../native/StackHeader";
2021
import {
@@ -40,32 +41,13 @@ function LicenseRow(props: {
4041
readonly onPress: () => void;
4142
}) {
4243
return (
43-
<Pressable
44-
accessibilityHint="Opens the complete license notice"
45-
accessibilityLabel={`${props.entry.name}, ${props.entry.license}`}
46-
accessibilityRole="button"
47-
onPress={props.onPress}
48-
className="border-b border-border bg-grouped-card px-5 py-4 active:bg-card-alt"
49-
>
50-
<View className="flex-row items-start gap-3">
51-
<View className="min-w-0 flex-1 gap-1">
52-
<Text className="text-base font-t3-medium text-foreground" numberOfLines={2}>
53-
{props.entry.name}
54-
</Text>
55-
<Text className="text-sm text-foreground-muted" numberOfLines={2}>
56-
{props.entry.version ? `${props.entry.version} · ` : ""}
57-
{props.entry.license}
58-
</Text>
59-
</View>
60-
<SymbolView
61-
name="chevron.right"
62-
size={16}
63-
tintColorClassName={"accent-chevron"}
64-
type="monochrome"
65-
weight="semibold"
66-
/>
67-
</View>
68-
</Pressable>
44+
<View className="border-b border-border">
45+
<ListRow
46+
label={props.entry.name}
47+
description={[props.entry.version, props.entry.license].filter(Boolean).join(" · ")}
48+
onPress={props.onPress}
49+
/>
50+
</View>
6951
);
7052
}
7153

0 commit comments

Comments
 (0)