fix(frontend): search bar height (#2998)

# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
This commit is contained in:
Antoine Dewez 2024-08-13 11:28:01 +02:00 committed by GitHub
parent 5da50c073a
commit fba922834a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 5 deletions

View File

@ -0,0 +1,6 @@
.editor_wrapper {
width: 100%;
caret-color: var(--accent);
max-height: 100px;
overflow: auto;
}

View File

@ -4,6 +4,7 @@ import "./styles.css";
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
import styles from "./Editor.module.scss";
import { useChatStateUpdater } from "./hooks/useChatStateUpdater";
import { useCreateEditorState } from "./hooks/useCreateEditorState";
import { useEditor } from "./hooks/useEditor";
@ -62,7 +63,7 @@ export const Editor = ({
return (
<EditorContent
className="w-full caret-accent"
className={styles.editor_wrapper}
onKeyDown={(event) => {
if (event.key === "Enter" && !event.shiftKey && !currentBrain) {
event.preventDefault();

View File

@ -14,6 +14,7 @@
display: flex;
padding: Spacings.$spacing05;
padding-top: 0;
gap: Spacings.$spacing05;
&.disabled {
pointer-events: none;

View File

@ -10,7 +10,7 @@
background-color: var(--background-0);
border-radius: Radius.$big;
border: 1px solid var(--border-0);
overflow: hidden;
overflow: auto;
box-shadow: BoxShadow.$large;
&.new_brain {
@ -19,9 +19,8 @@
.editor_wrapper {
display: flex;
align-items: center;
justify-content: space-between;
padding: Spacings.$spacing05;
gap: Spacings.$spacing05;
&.disabled {
pointer-events: none;
@ -35,9 +34,10 @@
.search_icon {
width: IconSizes.$big;
height: IconSizes.$big;
height: 100%;
color: var(--accent);
cursor: pointer;
align-self: flex-end;
&.disabled {
color: var(--text-3);