From dda897e3566666fd0c094d3f0bb45c29026a7dae Mon Sep 17 00:00:00 2001 From: liliana <liliana.sanfilippo@uni-bielefeld.de> Date: Fri, 19 Jul 2024 01:32:23 +0200 Subject: [PATCH] finished hp selector --- src/App/App.css | 4 ++++ src/components/Buttons.tsx | 18 ++++++++++++++++++ src/contents/human-practices.tsx | 15 ++------------- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/src/App/App.css b/src/App/App.css index 3ae088f8..dac9ebe1 100644 --- a/src/App/App.css +++ b/src/App/App.css @@ -2433,4 +2433,8 @@ html[dir=rtl] .hint-container.danger .hint-container-title:before { .sponsor-container{ align-items: center !important; display: flex !important; +} + +#All { + display: block; } \ No newline at end of file diff --git a/src/components/Buttons.tsx b/src/components/Buttons.tsx index 8fc34880..3816114c 100644 --- a/src/components/Buttons.tsx +++ b/src/components/Buttons.tsx @@ -1,4 +1,5 @@ import { Link } from "react-router-dom"; +import { openTab } from "../contents"; interface UrlButtonProps{ href: string, @@ -71,3 +72,20 @@ return ( ); }; + + +export function HPButtonrow(){ + + return( + <> + <div className="align-items-center bottom-buttons"> + <button className="active" onClick={openTab({cityName: "All"})}> All</button> + <button onClick={openTab({cityName: "Patient"})}> Patients</button> + <button onClick={openTab({cityName: "Academia"})}> Academia</button> + <button onClick={openTab({cityName: "Medical"})}> Medical professionals</button> + <button onClick={openTab({cityName: "Industry"})}> Industry</button> + </div> + </> + ) +} + diff --git a/src/contents/human-practices.tsx b/src/contents/human-practices.tsx index bd02a61d..e3a04120 100644 --- a/src/contents/human-practices.tsx +++ b/src/contents/human-practices.tsx @@ -11,6 +11,7 @@ import { TimeHori } from "../components/HorizontalTimeline"; import { AllPopus } from "../components/HorizontalTimeline"; import { BFHStyleTabs } from "../components/Tabs"; +import { HPButtonrow } from "../components/Buttons"; let tabbys =[ { @@ -103,7 +104,7 @@ let tabtabs = [ ] export function HumanPractices() { - + openTab({cityName: "All"}); return ( <> <HPButtonrow/> @@ -132,15 +133,3 @@ export function openTab({cityName}:{cityName: string}) { } - -export function HPButtonrow(){ - - return( - <> - <div className="row align-items-center bottom-buttons"> - <button onClick={openTab({cityName: "Patient"})}> Patient</button> - <button onClick={openTab({cityName: "All"})}> All</button> - </div> - </> - ) -} \ No newline at end of file -- GitLab