From da002df3f29cc5175c4d83c9e2e9f42181c05b00 Mon Sep 17 00:00:00 2001 From: glax Date: Sat, 19 Oct 2024 20:57:03 +0200 Subject: [PATCH] Add "Close Search" Button --- Website/App.tsx | 2 +- Website/modules/Search.tsx | 5 +++-- Website/styles/search.css | 18 ++++++++++++++++-- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Website/App.tsx b/Website/App.tsx index f67ac77..ce55ef0 100644 --- a/Website/App.tsx +++ b/Website/App.tsx @@ -40,7 +40,7 @@ export default function App(){ ? <> {showSearch ? <> - + setShowSearch(false)} />
: <>} diff --git a/Website/modules/Search.tsx b/Website/modules/Search.tsx index 5ade055..f66b9b4 100644 --- a/Website/modules/Search.tsx +++ b/Website/modules/Search.tsx @@ -7,7 +7,7 @@ import IManga, {SearchResult} from "./interfaces/IManga"; import '../styles/search.css'; import '../styles/MangaSearchResult.css' -export default function Search({onJobsChanged} : {onJobsChanged: EventHandler}) { +export default function Search({onJobsChanged, closeSearch} : {onJobsChanged: EventHandler, closeSearch(): void}) { const [mangaConnectors, setConnectors] = useState(); const [selectedConnector, setSelectedConnector] = useState(); const [selectedLanguage, setSelectedLanguage] = useState(); @@ -88,7 +88,7 @@ export default function Search({onJobsChanged} : {onJobsChanged: EventHandler = (event) => setSelectedLanguage(event.target.value); - return (
+ return (