From 1d155e45984e9773219d9dc1f1480594f23860cd Mon Sep 17 00:00:00 2001 From: Sarah-Zhang1 <147781368+Sarah-Zhang1@users.noreply.github.com> Date: Sun, 16 Feb 2025 15:22:30 -0500 Subject: [PATCH] New Search Bar! (#123) * New Search Bar! Yay! * Fix some styles (get rid of that ugly ring) * lint --------- Co-authored-by: banushi-a --- apps/web/public/svg/magnifyingGlass.svg | 3 ++ .../{search-bar.tsx => review-search-bar.tsx} | 10 ++-- .../app/_components/search/search-filter.tsx | 10 +++- .../_components/search/simple-search-bar.tsx | 47 +++++++++++++++++++ .../_components/themed/onboarding/input.tsx | 2 +- .../_components/themed/onboarding/select.tsx | 4 +- apps/web/src/app/styles/globals.css | 2 +- packages/ui/src/button.tsx | 2 +- packages/ui/src/input.tsx | 2 +- 9 files changed, 69 insertions(+), 13 deletions(-) create mode 100644 apps/web/public/svg/magnifyingGlass.svg rename apps/web/src/app/_components/search/{search-bar.tsx => review-search-bar.tsx} (85%) create mode 100644 apps/web/src/app/_components/search/simple-search-bar.tsx diff --git a/apps/web/public/svg/magnifyingGlass.svg b/apps/web/public/svg/magnifyingGlass.svg new file mode 100644 index 0000000..7cb952f --- /dev/null +++ b/apps/web/public/svg/magnifyingGlass.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/web/src/app/_components/search/search-bar.tsx b/apps/web/src/app/_components/search/review-search-bar.tsx similarity index 85% rename from apps/web/src/app/_components/search/search-bar.tsx rename to apps/web/src/app/_components/search/review-search-bar.tsx index 1c0ba5e..c6371d4 100644 --- a/apps/web/src/app/_components/search/search-bar.tsx +++ b/apps/web/src/app/_components/search/review-search-bar.tsx @@ -27,7 +27,7 @@ interface SearchBarProps { * @param param0 Cycle and Term to be set as default values for their respective dropdowns * @returns A search bar which is connected to a parent 'useForm' */ -export function SearchBar({ cycle, term }: SearchBarProps) { +export function ReviewSearchBar({ cycle, term }: SearchBarProps) { const form = useFormContext(); const [selectedCycle, setSelectedCycle] = useState(cycle); @@ -43,7 +43,7 @@ export function SearchBar({ cycle, term }: SearchBarProps) { @@ -66,7 +66,7 @@ export function SearchBar({ cycle, term }: SearchBarProps) { }} value={selectedCycle} > - + @@ -101,7 +101,7 @@ export function SearchBar({ cycle, term }: SearchBarProps) { }} value={selectedTerm} > - + @@ -121,7 +121,7 @@ export function SearchBar({ cycle, term }: SearchBarProps) { )} /> + ( + + + + + + )} + /> + + ); +} diff --git a/apps/web/src/app/_components/themed/onboarding/input.tsx b/apps/web/src/app/_components/themed/onboarding/input.tsx index c592b03..e68f0a8 100644 --- a/apps/web/src/app/_components/themed/onboarding/input.tsx +++ b/apps/web/src/app/_components/themed/onboarding/input.tsx @@ -3,7 +3,7 @@ import { Input as InputPrimitive } from "@cooper/ui/input"; export function Input(props: React.ComponentProps) { return ( ); diff --git a/apps/web/src/app/_components/themed/onboarding/select.tsx b/apps/web/src/app/_components/themed/onboarding/select.tsx index feb34ce..ddc5bbe 100644 --- a/apps/web/src/app/_components/themed/onboarding/select.tsx +++ b/apps/web/src/app/_components/themed/onboarding/select.tsx @@ -18,12 +18,12 @@ export const Select: React.FC = ({