Skip to content

Commit

Permalink
small ui improvements (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
fpgmaas authored Jul 3, 2024
1 parent e01fbe5 commit 40ad8ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions frontend/app/components/ToggleSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ const ToggleSwitch: React.FC<ToggleSwitchProps> = ({
onToggle,
}) => {
return (
<div className="flex space-x-4 bg-sky-800 p-2 rounded-lg shadow-md">
<div className="flex space-x-4 bg-sky-900 p-2 rounded-lg shadow-md">
<button
className={`px-4 py-2 rounded ${
className={`px-4 py-2 w-[80px] rounded ${
selectedOption === option1
? "bg-white text-sky-900"
: " bg-sky-950 text-white"
: " bg-sky-950 text-white hover:bg-sky-700"
}`}
onClick={() => onToggle(option1)}
>
{option1}
</button>
<button
className={`px-4 py-2 rounded ${
className={`px-4 py-2 w-[80px] rounded ${
selectedOption === option2
? "bg-white text-sky-900"
: " bg-sky-950 text-white"
: " bg-sky-950 text-white hover:bg-sky-700"
}`}
onClick={() => onToggle(option2)}
>
Expand Down
8 changes: 4 additions & 4 deletions frontend/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default function Home() {
</div>

{results.length > 0 && (
<div className="w-full flex justify-center mt-6">
<div className="w-full flex justify-center mt-0">
<ToggleSwitch
option1="Plot"
option2="Table"
Expand All @@ -121,14 +121,14 @@ export default function Home() {
{" "}
{/* Reference to this div */}
{results.length > 0 && view === "Plot" && (
<div className="w-full flex justify-center mt-6">
<div className="w-full flex justify-center mt-0">
<div className="w-full max-w-[1200px] bg-sky-900 p-6 rounded-lg shadow-lg flex flex-col justify-center items-center">
<ScatterPlot results={results} />
</div>
</div>
)}
{results.length > 0 && view === "Table" && (
<div className="w-full flex justify-center mt-6">
<div className="w-full flex justify-center mt-0">
<div className="w-full bg-sky-900 p-6 rounded-lg shadow-lg flex flex-col justify-center items-center">
<SearchResultsTable
results={results}
Expand All @@ -143,7 +143,7 @@ export default function Home() {

<div className="w-full flex justify-center mt-6">
<button
className="w-full max-w-[250px] p-2 border border-sky-700 rounded bg-sky-800 text-white hover:bg-sky-700 focus:outline-none focus:ring-2 focus:ring-sky-700"
className="w-full max-w-[250px] p-2 border border-sky-700 rounded bg-sky-900 text-white hover:bg-sky-700 focus:outline-none focus:ring-2 focus:ring-sky-700"
onClick={() => setInfoBoxVisible(!infoBoxVisible)}
>
{infoBoxVisible ? "Hide Info" : "How does this work?"}
Expand Down

0 comments on commit 40ad8ee

Please sign in to comment.