File size: 660 Bytes
3201ca6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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>
  );
}