From 665e913387e07d37dd23b04c4804ab7ea1c9ef4a Mon Sep 17 00:00:00 2001 From: chunxtan Date: Sat, 9 Nov 2024 12:27:51 +0800 Subject: [PATCH 1/3] add chat search bar --- frontend/src/app/page.tsx | 2 ++ .../main-layout/main-layout.module.css | 2 +- .../search-bar/search-bar.module.css | 3 +++ .../src/components/search-bar/search-bar.tsx | 25 +++++++++++++++++ .../src/components/search-bar/search-icon.jsx | 27 +++++++++++++++++++ 5 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 frontend/src/components/search-bar/search-bar.module.css create mode 100644 frontend/src/components/search-bar/search-bar.tsx create mode 100644 frontend/src/components/search-bar/search-icon.jsx diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 59ccb49..a14956c 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,7 +1,9 @@ +import SearchBar from "@/components/search-bar/search-bar"; export default function Home() { return (
+
) } diff --git a/frontend/src/components/main-layout/main-layout.module.css b/frontend/src/components/main-layout/main-layout.module.css index 838417b..4bbffa9 100644 --- a/frontend/src/components/main-layout/main-layout.module.css +++ b/frontend/src/components/main-layout/main-layout.module.css @@ -1,6 +1,6 @@ .contentWrapper { padding: 2em 5em; margin: 0 auto; - max-width: 1200px; + max-width: 800px; box-sizing: border-box; } diff --git a/frontend/src/components/search-bar/search-bar.module.css b/frontend/src/components/search-bar/search-bar.module.css new file mode 100644 index 0000000..82a2ec7 --- /dev/null +++ b/frontend/src/components/search-bar/search-bar.module.css @@ -0,0 +1,3 @@ +.searchButton { + margin-top: auto +} diff --git a/frontend/src/components/search-bar/search-bar.tsx b/frontend/src/components/search-bar/search-bar.tsx new file mode 100644 index 0000000..fdf797d --- /dev/null +++ b/frontend/src/components/search-bar/search-bar.tsx @@ -0,0 +1,25 @@ +import { Button, Textarea } from "@nextui-org/react"; +import { SearchIcon } from './search-icon'; +import classes from './search-bar.module.css'; + +export default function SearchBar() { + + return ( + <> +