@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
tsx 34 lines 1.09 KB
Raw
1 import { useGT } from "gt-react-native";
2 import { View } from "react-native";
3
4 import { Button } from "../../../components/ui/Button";
5 import { AppText as Text } from "../../../components/ui/AppText";
6 import { SettingsSection } from "./SettingsSection";
7
8 export function SettingsProjectOverridesSection(props: {
9 readonly projectLabel: string;
10 readonly hasOverrides: boolean;
11 readonly pending: boolean;
12 readonly disabled?: boolean;
13 readonly onClear: () => void;
14 }) {
15 const gt = useGT();
16 return (
17 <SettingsSection title={gt("Project")}>
18 <View className="min-h-16 flex-row items-center gap-3 px-4 py-3">
19 <Text className="min-w-0 flex-1 text-base text-foreground" numberOfLines={2}>
20 {props.projectLabel}
21 </Text>
22 {!props.pending && props.hasOverrides ? (
23 <Button
24 label={gt("Use defaults")}
25 accessibilityHint={gt("Use environment defaults for this project")}
26 tone="text"
27 disabled={props.disabled}
28 onPress={props.onClear}
29 />
30 ) : null}
31 </View>
32 </SettingsSection>
33 );
34 }