From 903bb7c5eed4cb8f2692ccfd99667c4a8dc79182 Mon Sep 17 00:00:00 2001 From: toddnief Date: Fri, 2 Aug 2024 13:52:10 -0500 Subject: [PATCH 1/3] remove commented code --- dashboard-react/components/CheckboxMenu.js | 37 ++++++------------- .../components/RadioSingleSelect.js | 23 ------------ 2 files changed, 12 insertions(+), 48 deletions(-) diff --git a/dashboard-react/components/CheckboxMenu.js b/dashboard-react/components/CheckboxMenu.js index 7892810..06fda0d 100644 --- a/dashboard-react/components/CheckboxMenu.js +++ b/dashboard-react/components/CheckboxMenu.js @@ -11,8 +11,6 @@ export default function CheckboxMenu({ title, }) { const snap = useSnapshot(state); - // Note: Use local state for the expanded state of the menu - const [expanded, setExpanded] = useState(false); const handleCheckboxChange = (key, value) => (event) => { const checked = event.target.checked; @@ -41,30 +39,19 @@ export default function CheckboxMenu({ return (
-
-

{title}

-
- - - -
+
+

+ {title} +
+ + + +
+

- {/*
- -
*/} - {/*
*/}
    {options?.map((option) => ( diff --git a/dashboard-react/components/RadioSingleSelect.js b/dashboard-react/components/RadioSingleSelect.js index f0633c9..78a29ec 100644 --- a/dashboard-react/components/RadioSingleSelect.js +++ b/dashboard-react/components/RadioSingleSelect.js @@ -29,28 +29,5 @@ export default function RadioSingleSelect({ options, title, filterKey }) { ))}
- // <> - //
- //

{title}

- //
- // {Object.entries(options).map(([key, value]) => ( - // - // ))} - //
- //
- // ); } From 206370900d5172787f8ffccaca0930ee6c4ce1f0 Mon Sep 17 00:00:00 2001 From: toddnief Date: Fri, 2 Aug 2024 13:55:01 -0500 Subject: [PATCH 2/3] center titles --- dashboard-react/components/CheckboxMenu.js | 26 ++++++++++--------- .../components/DashboardFilterControls.js | 15 ++++------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/dashboard-react/components/CheckboxMenu.js b/dashboard-react/components/CheckboxMenu.js index 06fda0d..e1f7c4d 100644 --- a/dashboard-react/components/CheckboxMenu.js +++ b/dashboard-react/components/CheckboxMenu.js @@ -39,18 +39,20 @@ export default function CheckboxMenu({ return (
-
-

- {title} -
- - - -
-

+
+
+

+ {title} +
+ + + +
+

+
    diff --git a/dashboard-react/components/DashboardFilterControls.js b/dashboard-react/components/DashboardFilterControls.js index 4189015..0a89ee3 100644 --- a/dashboard-react/components/DashboardFilterControls.js +++ b/dashboard-react/components/DashboardFilterControls.js @@ -20,36 +20,31 @@ export default function DashboardFilterControls() { options={snap.options["Technology"]} selectedOptions={snap.filters.selectedTechnologies} filterKey="selectedTechnologies" - title="Select Technology(ies)" + title="Select Technology" /> - {/*
*/} - {/*
-
-

Operating Conditions Filters

-
*/}
From 7e5183a6996a57d9679a8dfd6d817b81d8fd9a6e Mon Sep 17 00:00:00 2001 From: toddnief Date: Fri, 2 Aug 2024 14:05:33 -0500 Subject: [PATCH 3/3] style checkbox menus more --- dashboard-react/components/CheckboxMenu.js | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/dashboard-react/components/CheckboxMenu.js b/dashboard-react/components/CheckboxMenu.js index e1f7c4d..3c559da 100644 --- a/dashboard-react/components/CheckboxMenu.js +++ b/dashboard-react/components/CheckboxMenu.js @@ -54,8 +54,27 @@ export default function CheckboxMenu({
+
+ + +
+
-
    +
      {options?.map((option) => (
-
- - -
-
); }