Open History to see the last commit
1import type { ReactNode } from "react";
2import { Platform, View } from "react-native";
3
4import { AppText as Text } from "../../../components/AppText";
5
6export function SettingsSection(props: {
7 readonly title?: string;
8 readonly trailing?: ReactNode;
9 readonly children: ReactNode;
10}) {
11 return (
12 <View className="gap-2">
13 {props.title ? (
14 <View className="flex-row items-center justify-between gap-3">
15 <Text
16 className={
17 Platform.OS === "android"
18 ? "px-4 text-sm font-t3-medium text-primary-text"
19 : "px-2 text-sm font-t3-medium text-foreground-muted"
20 }
21 >
22 {props.title}
23 </Text>
24 {props.trailing}
25 </View>
26 ) : null}
27 <View
28 className={
29 Platform.OS === "android"
30 ? "overflow-hidden rounded-[28px] bg-grouped-card"
31 : "overflow-hidden rounded-[24px] border-continuous bg-grouped-card"
32 }
33 >
34 {props.children}
35 </View>
36 </View>
37 );
38}