@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 43 lines 1.27 KB
Raw
1 import { T, useGT } from "gt-react-native";
2 import { Pressable, type StyleProp, type ViewStyle } from "react-native";
3
4 import { cn } from "../lib/cn";
5 import { AppText } from "./ui/AppText";
6 import { SymbolView } from "./ui/AppSymbol";
7
8 export function NewThreadButton(props: {
9 readonly onPress: () => void;
10 readonly extended?: boolean;
11 readonly expanded?: boolean;
12 readonly className?: string;
13 readonly style?: StyleProp<ViewStyle>;
14 }) {
15 const gt = useGT();
16 return (
17 <Pressable
18 accessibilityLabel={gt("New thread")}
19 accessibilityRole="button"
20 onPress={props.onPress}
21 className={cn(
22 "items-center justify-center bg-primary shadow-lg active:opacity-70",
23 props.extended
24 ? "h-[56px] flex-row gap-[8px] rounded-[16px] px-[16px]"
25 : "size-[80px] rounded-[20px]",
26 props.className,
27 )}
28 style={props.style}
29 >
30 <SymbolView
31 name="square.and.pencil"
32 size={props.extended ? 24 : 28}
33 tintColorClassName="accent-primary-foreground"
34 type="monochrome"
35 />
36 {props.extended && props.expanded !== false ? (
37 <AppText className="text-[16px] font-t3-medium text-primary-foreground">
38 <T>New thread</T>
39 </AppText>
40 ) : null}
41 </Pressable>
42 );
43 }