Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Change editor styling [WIP]

Tomas Valenta654b11fac598
diff --git a/components/Editor/RouteEditor/PromptEditor.tsx b/components/Editor/RouteEditor/PromptEditor.tsx
index d6a408033..c30f83eb5 100644
--- a/components/Editor/RouteEditor/PromptEditor.tsx
+++ b/components/Editor/RouteEditor/PromptEditor.tsx
@@ -17,16 +17,15 @@ function PromptEditor({ onChange, block }: Props) {
return (
<div className="
flex
- min-w-full
- rounded
- bg-slate-300
+ w-full
+ h-full
">
<EditorContent
editor={editor}
className="
- w-full
- h-full
- outline-none
+ flex-1
+ flex
+ flex-col
"
/>
</div>
diff --git a/components/Editor/RouteEditor/index.tsx b/components/Editor/RouteEditor/index.tsx
index 757a1a06a..2c6878257 100644
--- a/components/Editor/RouteEditor/index.tsx
+++ b/components/Editor/RouteEditor/index.tsx
@@ -23,8 +23,7 @@ function RouteEditor({ route }: Props) {
px-4
flex
flex-1
- bg-white
- items-start
+ bg-white
justify-center
overflow-hidden
">
@@ -37,31 +36,31 @@ function RouteEditor({ route }: Props) {
</div>
}
{route &&
- <>
- <div className="
+ <div className="
flex
flex-1
flex-col
+ bg-slate-400
items-center
max-w-[65ch]
+ min-h-0
overflow-auto
scroller
space-y-2
">
- {requestBodyBlock &&
- <RequestBodyEditor
- block={requestBodyBlock}
- onChange={updateRequestBodyBlock}
- />
- }
- {promptBlock &&
- <PromptEditor
- block={promptBlock}
- onChange={updatePromptBlock}
- />
- }
- </div>
- </>
+ {requestBodyBlock &&
+ <RequestBodyEditor
+ block={requestBodyBlock}
+ onChange={updateRequestBodyBlock}
+ />
+ }
+ {promptBlock &&
+ <PromptEditor
+ block={promptBlock}
+ onChange={updatePromptBlock}
+ />
+ }
+ </div>
}
</div >
)
diff --git a/styles/global.css b/styles/global.css
index 1ef397ef9..47331c371 100644
--- a/styles/global.css
+++ b/styles/global.css
@@ -81,3 +81,7 @@ code::-webkit-scrollbar-thumb {
.ProseMirror:focus {
outline: none;
}
+
+.ProseMirror {
+ @apply h-full w-full;
+}