From dea0925f73d4e03b17d44c2d8fee75dc1638e493 Mon Sep 17 00:00:00 2001 From: Mike Burgess Date: Thu, 14 Nov 2024 15:58:52 +0700 Subject: [PATCH] Styling --- .../src/components/SpiltSnapButton/index.tsx | 156 +++++++++--------- 1 file changed, 77 insertions(+), 79 deletions(-) diff --git a/ui/dashboard/src/components/SpiltSnapButton/index.tsx b/ui/dashboard/src/components/SpiltSnapButton/index.tsx index d69353c6..140c8dd1 100644 --- a/ui/dashboard/src/components/SpiltSnapButton/index.tsx +++ b/ui/dashboard/src/components/SpiltSnapButton/index.tsx @@ -38,7 +38,7 @@ const SplitButton: React.FC = ({ className }) => { const fileInputRefForDiff = useRef(null); const navigate = useNavigate(); - const isDashBoard = !selectedDashboard && !snapshot; + const isDashboardList = !selectedDashboard && !snapshot; const isLive = selectedDashboard && dataMode === DashboardDataModeLive; @@ -170,7 +170,7 @@ const SplitButton: React.FC = ({ className }) => { className="inline-flex items-center space-x-2 shadow-none rounded-r-none" onClick={handleMainButtonClick} > */} - {isDashBoard && ( + {isDashboardList && ( = ({ className }) => { )} - {!isDashBoard && ( + {!isDashboardList && ( {/* - -
- {isLive && ( - - {({ active }) => ( - - - Snap - - )} - - )} + + {isLive && ( {({ active }) => ( - <> - { - if (fileInputRefForDiff.current) { - fileInputRefForDiff.current.click(); // Ensure this triggers the click on the input - } - }} - > - - Diff - - + - + Snap + )} - - {({ active }) => ( - <> - { - if (fileInputRef.current) { - fileInputRef.current.click(); // Ensure this triggers the click on the input - } - }} - > - - Open - - {/* Move the input outside of NeutralButton */} - + {({ active }) => ( + <> + { + if (fileInputRefForDiff.current) { + fileInputRefForDiff.current.click(); // Ensure this triggers the click on the input + } + }} + > + - - )} - -
+ Diff + + + + )} + + + {({ active }) => ( + <> + { + if (fileInputRef.current) { + fileInputRef.current.click(); // Ensure this triggers the click on the input + } + }} + > + + Open + + {/* Move the input outside of NeutralButton */} + + + )} +
)}