@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 38 lines 1.04 KB
Raw
1 import { useGT } from "gt-react-native";
2
3 import { AppBar } from "../../components/ui/AppBar";
4 import { SheetHeader } from "../../components/ui/SheetHeader";
5
6 /** A thread shown outside its route: in the inspector pane, or presented full screen with a close. */
7 export type ThreadInspectorPresentation =
8 | { readonly onMaximize: () => void }
9 | { readonly onClose: () => void };
10
11 export function ThreadInspectorHeader(
12 props: ThreadInspectorPresentation & { readonly title: string; readonly subtitle?: string },
13 ) {
14 const gt = useGT();
15 if ("onMaximize" in props) {
16 return (
17 <AppBar
18 title={props.title}
19 subtitle={props.subtitle}
20 actions={[
21 {
22 accessibilityLabel: gt("Maximize thread"),
23 icon: "arrow.up.left.and.arrow.down.right",
24 onPress: props.onMaximize,
25 },
26 ]}
27 />
28 );
29 }
30 return (
31 <SheetHeader
32 title={props.title}
33 subtitle={props.subtitle}
34 onClose={props.onClose}
35 accessibilityLabel={gt("Close thread")}
36 />
37 );
38 }