Download src/components/features/diff-viewer/editor-container.tsx from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 660 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/diff-viewer/editor-container.tsx
- Command line
-
hf download hf://SaylorTwift/openhands/src/components/features/diff-viewer/editor-container.tsx
-
curl -L -o editor-container.tsx https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/diff-viewer/editor-container.tsx
660 Bytes
| import React from "react"; | |
| import { cn } from "#/utils/utils"; | |
| interface EditorContainerProps { | |
| height: number; | |
| children: React.ReactNode; | |
| className?: string; | |
| } | |
| export function EditorContainer({ | |
| height, | |
| children, | |
| className, | |
| }: EditorContainerProps) { | |
| return ( | |
| <div | |
| data-testid="editor-container" | |
| className={cn( | |
| "w-full border-b border-[var(--oh-border)] overflow-hidden h-[var(--editor-height)]", | |
| className, | |
| )} | |
| // CSS custom property plumbed through for h-[var(--editor-height)] above | |
| style={{ "--editor-height": `${height}px` } as React.CSSProperties} | |
| > | |
| {children} | |
| </div> | |
| ); | |
| } | |