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
| 1 | import { T } from "gt-react"; |
| 2 | import { type ReactNode } from "react"; |
| 3 | |
| 4 | import { Sheet, SheetHeader, SheetPopup, SheetTitle } from "./ui/sheet"; |
| 5 | |
| 6 | export function RightPanelSheet(props: { |
| 7 | animationDurationMs: number; |
| 8 | children: ReactNode; |
| 9 | open: boolean; |
| 10 | onClose: () => void; |
| 11 | }) { |
| 12 | return ( |
| 13 | <Sheet |
| 14 | open={props.open} |
| 15 | onOpenChange={(open) => { |
| 16 | if (!open) { |
| 17 | props.onClose(); |
| 18 | } |
| 19 | }} |
| 20 | > |
| 21 | <SheetPopup |
| 22 | transitionDurationMs={props.animationDurationMs} |
| 23 | side="right" |
| 24 | showCloseButton={false} |
| 25 | keepMounted |
| 26 | className="w-[min(42vw,28rem)] min-w-80 max-w-[28rem] max-[760px]:w-[min(88vw,24rem)] max-[760px]:min-w-0 wco:mt-(--workspace-topbar-height) wco:h-[calc(100%-var(--workspace-topbar-height))] wco:max-h-[calc(100%-var(--workspace-topbar-height))]" |
| 27 | > |
| 28 | <SheetHeader className="sr-only"> |
| 29 | <SheetTitle> |
| 30 | <T>Workspace panel</T> |
| 31 | </SheetTitle> |
| 32 | </SheetHeader> |
| 33 | {props.children} |
| 34 | </SheetPopup> |
| 35 | </Sheet> |
| 36 | ); |
| 37 | } |