MCPcopy Create free account
hub / github.com/pingdotgg/t3code / DiffPanelShell

Function DiffPanelShell

apps/web/src/components/DiffPanelShell.tsx:20–46  ·  view source on GitHub ↗
(props: {
  mode: DiffPanelMode;
  header: ReactNode;
  children: ReactNode;
})

Source from the content-addressed store, hash-verified

18}
19
20export function DiffPanelShell(props: {
21 mode: DiffPanelMode;
22 header: ReactNode;
23 children: ReactNode;
24}) {
25 const shouldUseDragRegion = isElectron && props.mode !== "sheet" && props.mode !== "embedded";
26
27 return (
28 <div
29 className={cn(
30 "flex h-full min-w-0 flex-col bg-background",
31 props.mode === "inline"
32 ? "w-[42vw] min-w-[360px] max-w-[560px] shrink-0 border-l border-border"
33 : "w-full",
34 )}
35 >
36 {shouldUseDragRegion ? (
37 <div className={getDiffPanelHeaderRowClassName(props.mode)}>{props.header}</div>
38 ) : (
39 <div className={getDiffPanelHeaderRowClassName(props.mode)} data-surface-subheader>
40 {props.header}
41 </div>
42 )}
43 {props.children}
44 </div>
45 );
46}
47
48export function DiffPanelHeaderSkeleton() {
49 return (

Callers

nothing calls this directly

Calls 2

cnFunction · 0.90

Tested by

no test coverage detected