Skip to content

armgit / E2B

Public Imported from GitHub
0

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

Tweak autocomplete styling [WIP]

Tomas Valenta7d49e1d52994
diff --git a/components/Editor/RouteEditor/PromptEditor/Autocomplete/Item.tsx b/components/Editor/RouteEditor/PromptEditor/Autocomplete/Item.tsx
index 709cdcfab..385c5dca6 100644
--- a/components/Editor/RouteEditor/PromptEditor/Autocomplete/Item.tsx
+++ b/components/Editor/RouteEditor/PromptEditor/Autocomplete/Item.tsx
@@ -29,18 +29,21 @@ function Item({
<div
ref={setScrollRef}
className={cn(
- 'px-4',
- 'py-1',
+ 'px-6',
+ 'py-0.5',
'shrink-0',
'flex',
'font-mono',
'items-center',
+ 'text-sm',
'group',
+
'overflow-ellipsis',
'overflow-hidden',
'cursor-pointer',
{
- 'bg-indigo-50': isSelected,
+ 'text-slate-600': !isSelected,
+ 'bg-indigo-100 text-indigo-400': isSelected,
},
)}
onMouseDown={selectItem}
@@ -48,7 +51,7 @@ function Item({
<Text
text={title}
/>
- </div>
+ </div >
)
}
diff --git a/components/Editor/RouteEditor/PromptEditor/Autocomplete/index.tsx b/components/Editor/RouteEditor/PromptEditor/Autocomplete/index.tsx
index 6d0fc1edf..a5cfa2237 100644
--- a/components/Editor/RouteEditor/PromptEditor/Autocomplete/index.tsx
+++ b/components/Editor/RouteEditor/PromptEditor/Autocomplete/index.tsx
@@ -93,11 +93,10 @@ const Autocomplete: AutocompleteList = forwardRef(({
overflow-y-auto
overscroll-none
rounded
-
border
- border-indigo-300
-
- bg-white
+ border-slate-300
+ bg-slate-50
+ shadow-md
"
>
{items.map((item, index) => (
diff --git a/editor/extensions/autocomplete/index.ts b/editor/extensions/autocomplete/index.ts
index 96e4224bd..dc05e5895 100644
--- a/editor/extensions/autocomplete/index.ts
+++ b/editor/extensions/autocomplete/index.ts
@@ -15,7 +15,6 @@ import AutocompleteListWrapper, { AutocompleteList } from 'components/Editor/Rou
import { Suggestion, SuggestionOptions } from './suggestion'
import Autocomplete from 'components/Editor/RouteEditor/PromptEditor/Autocomplete'
-export * from './findSuggestionMatch'
export * from './suggestion'
export type AutocompleteOptions = {
diff --git a/styles/prosemirror.css b/styles/prosemirror.css
index 863c1213a..c42a501ec 100644
--- a/styles/prosemirror.css
+++ b/styles/prosemirror.css
@@ -39,6 +39,6 @@
}
.reference {
- @apply py-0.5 text-indigo-400 font-semibold font-mono;
+ @apply text-indigo-400 font-semibold font-mono;
box-decoration-break: clone;
}
\ No newline at end of file