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

SettingsProjectOverridesSection.tsx

32 lines1.0 KB

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