Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Improve editor styling [WIP]

Tomas Valentaabf403841da1
diff --git a/components/Editor/RouteEditor/PromptEditor.tsx b/components/Editor/RouteEditor/PromptEditor.tsx
index b49573284..d6a408033 100644
--- a/components/Editor/RouteEditor/PromptEditor.tsx
+++ b/components/Editor/RouteEditor/PromptEditor.tsx
@@ -19,7 +19,6 @@ function PromptEditor({ onChange, block }: Props) {
flex
min-w-full
rounded
- border
bg-slate-300
">
<EditorContent
diff --git a/components/Editor/Routes.tsx b/components/Editor/Routes.tsx
index eaa41d0e6..3703dca7c 100644
--- a/components/Editor/Routes.tsx
+++ b/components/Editor/Routes.tsx
@@ -85,10 +85,6 @@ function Routes({
space-x-1
"
>
- <Text
- className="font-mono"
- text={r.route}
- />
<div className="flex items-center space-x-2">
<Select
direction="left"
diff --git a/components/Select/index.tsx b/components/Select/index.tsx
index 7778da521..ffeb8d542 100644
--- a/components/Select/index.tsx
+++ b/components/Select/index.tsx
@@ -48,7 +48,6 @@ function Select({
">
<div
className="
- relative
select-none
"
ref={ref}
@@ -58,7 +57,6 @@ function Select({
`transition-all
cursor-pointer
flex
- hover:text-green-800
items-center
justify-between
space-x-1`,
@@ -69,46 +67,50 @@ function Select({
)}
>
<Text
- className="font-mono"
+ className="font-mono hover:text-green-800"
text={selectedValue.title}
/>
<ChevronDownIcon
- className="self-center"
+ className="self-center text-slate-300 hover:text-green-800"
size={14}
- onClick={() => setIsOpened(val => !val)}
+ onClick={e => {
+ e.preventDefault()
+ e.stopPropagation()
+ setIsOpened(val => !val)
+ }}
/>
</div>
{/* Modal */}
{isOpened && (
- <div className={clsx(
- {
- 'left-0': direction === 'left',
- 'right-0': direction === 'right',
- },
- `z-[999]
+ <div className="absolute">
+ <div className={clsx(
+ {
+ 'left-0': direction === 'left',
+ 'right-0': direction === 'right',
+ },
+ `z-[999]
top-[28px]
-
- absolute
p-1
mt-0.5
border border-green-500
rounded
bg-white
space-y-2`
- )}>
- <div className="
+ )}>
+ <div className="
flex
flex-col
space-y-1
">
- {values.map(val => (
- <SelectValue
- isSelected={val.key === selectedValue.key}
- key={val.key}
- value={val}
- onSelect={handleValueSelect}
- />
- ))}
+ {values.map(val => (
+ <SelectValue
+ isSelected={val.key === selectedValue.key}
+ key={val.key}
+ value={val}
+ onSelect={handleValueSelect}
+ />
+ ))}
+ </div>
</div>
</div>
)}
diff --git a/styles/global.css b/styles/global.css
index b756a2be7..1ef397ef9 100644
--- a/styles/global.css
+++ b/styles/global.css
@@ -1,5 +1,5 @@
@import 'highlight.js/styles/a11y-dark.css';
-@import './prosemirror.css';
+/* @import './prosemirror.css'; */
@tailwind base;
@tailwind components;