Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

SettingsAppearanceRouteScreen.tsx

38 lines1.4 KB

1import { useNavigation } from "@react-navigation/native";
2import { Platform, ScrollView, View } from "react-native";
3import { useSafeAreaInsets } from "react-native-safe-area-context";
4​
5import { AndroidScreenHeader } from "../../components/AndroidScreenHeader";
6import { NativeStackScreenOptions } from "../../native/StackHeader";
7import { CodeAppearanceSection } from "./appearance/sections/CodeAppearanceSection";
8import { TerminalAppearanceSection } from "./appearance/sections/TerminalAppearanceSection";
9import { TextAppearanceSection } from "./appearance/sections/TextAppearanceSection";
10​
11export function SettingsAppearanceRouteScreen() {
12 const navigation = useNavigation();
13 const insets = useSafeAreaInsets();
14​
15 return (
16 <View collapsable={false} className="flex-1 bg-sheet">
17 {Platform.OS === "android" ? (
18 <>
19 <NativeStackScreenOptions options={{ headerShown: false }} />
20 <AndroidScreenHeader title="Appearance" onBack={() => navigation.goBack()} />
21 </>
22 ) : null}
23 <ScrollView
24 contentInsetAdjustmentBehavior="automatic"
25 showsVerticalScrollIndicator={false}
26 className="flex-1"
27 contentContainerClassName="gap-6 px-5 pt-4"
28 contentContainerStyle={{
29 paddingBottom: Math.max(insets.bottom, 18) + 18,
30 }}
31 >
32 <TextAppearanceSection />
33 <TerminalAppearanceSection />
34 <CodeAppearanceSection />
35 </ScrollView>
36 </View>
37 );