From 9f17eb1d282c66c60bf7c5af7efec1087c05cccf Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Tue, 18 Mar 2025 19:33:26 +0530 Subject: [PATCH] feat(textInput) new design --- frontend/src/assets/clip.svg | 3 + frontend/src/assets/paper_plane.svg | 3 + frontend/src/assets/source.svg | 4 ++ frontend/src/assets/tool.svg | 6 ++ frontend/src/components/MessageInput.tsx | 87 ++++++++++++++---------- 5 files changed, 67 insertions(+), 36 deletions(-) create mode 100644 frontend/src/assets/clip.svg create mode 100644 frontend/src/assets/paper_plane.svg create mode 100644 frontend/src/assets/source.svg create mode 100644 frontend/src/assets/tool.svg diff --git a/frontend/src/assets/clip.svg b/frontend/src/assets/clip.svg new file mode 100644 index 00000000..a778e06b --- /dev/null +++ b/frontend/src/assets/clip.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/paper_plane.svg b/frontend/src/assets/paper_plane.svg new file mode 100644 index 00000000..7520946d --- /dev/null +++ b/frontend/src/assets/paper_plane.svg @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/assets/source.svg b/frontend/src/assets/source.svg new file mode 100644 index 00000000..06187a97 --- /dev/null +++ b/frontend/src/assets/source.svg @@ -0,0 +1,4 @@ + + + + diff --git a/frontend/src/assets/tool.svg b/frontend/src/assets/tool.svg new file mode 100644 index 00000000..3b4df3e3 --- /dev/null +++ b/frontend/src/assets/tool.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/frontend/src/components/MessageInput.tsx b/frontend/src/components/MessageInput.tsx index ef422ca3..7ffe6dc1 100644 --- a/frontend/src/components/MessageInput.tsx +++ b/frontend/src/components/MessageInput.tsx @@ -1,8 +1,8 @@ import { useEffect, useRef } from 'react'; import { useTranslation } from 'react-i18next'; import { useDarkTheme } from '../hooks'; -import Send from '../assets/send.svg'; -import SendDark from '../assets/send_dark.svg'; +import PaperPlane from '../assets/paper_plane.svg'; +import SourceIcon from '../assets/source.svg'; import SpinnerDark from '../assets/spinner-dark.svg'; import Spinner from '../assets/spinner.svg'; @@ -34,7 +34,6 @@ export default function MessageInput({ } }; - // Focus the textarea and set initial height on mount. useEffect(() => { inputRef.current?.focus(); handleInput(); @@ -52,43 +51,59 @@ export default function MessageInput({ }; return ( -
- -