@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 56 lines 1.75 KB
Raw
1 import { T } from "gt-react";
2 import { ChevronDownIcon, PaperclipIcon } from "lucide-react";
3
4 import { Button } from "../ui/button";
5
6 export function WorkspaceFileDropOverlay() {
7 return (
8 <div
9 className="pointer-events-none absolute inset-2 z-40 flex items-center justify-center rounded-2xl border-2 border-dashed border-primary/60 bg-primary/[0.035]"
10 data-chat-workspace-drop-overlay="true"
11 >
12 <div
13 role="status"
14 className="flex items-center gap-2 rounded-full border border-primary/25 bg-background/95 px-4 py-2.5 text-sm font-medium text-foreground shadow-lg"
15 >
16 <PaperclipIcon className="size-4 text-primary" aria-hidden="true" />
17 <T>Drop files to attach</T>
18 </div>
19 </div>
20 );
21 }
22
23 /**
24 * Sits `bottom` pixels up, clear of the composer and its attached banners. The summary names
25 * what waits at the end of the timeline, which is out of view while it shows.
26 */
27 export function ScrollToEndButton(props: {
28 readonly bottom: number;
29 readonly summary: string | null;
30 readonly onScrollToEnd: () => void;
31 }) {
32 return (
33 <div
34 className="chat-scroll-to-bottom pointer-events-none absolute z-30 flex justify-center py-1.5"
35 style={{ bottom: props.bottom }}
36 >
37 <Button
38 data-scroll-to-end="true"
39 onPointerDown={(event) => event.preventDefault()}
40 onClick={props.onScrollToEnd}
41 className="pointer-events-auto"
42 size="xs"
43 variant="glass"
44 >
45 <ChevronDownIcon className="size-3.5" />
46 <T>Scroll to end</T>
47 {props.summary === null ? null : (
48 <span className="text-muted-foreground">
49 <span aria-hidden>· </span>
50 {props.summary}
51 </span>
52 )}
53 </Button>
54 </div>
55 );
56 }