(props: {
mode: DiffPanelMode;
header: ReactNode;
children: ReactNode;
})
| 18 | } |
| 19 | |
| 20 | export 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 | |
| 48 | export function DiffPanelHeaderSkeleton() { |
| 49 | return ( |
nothing calls this directly
no test coverage detected