From ae680bc926f0670d1cc9da29112a229d74e92a09 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Fri, 20 Jun 2025 14:42:00 +0200 Subject: [PATCH] settle for base tabs instead of MUI styled tabs --- .../Changes/Change/DiffableChange.tsx | 211 +++++++----------- 1 file changed, 84 insertions(+), 127 deletions(-) diff --git a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/DiffableChange.tsx b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/DiffableChange.tsx index 05ccab2118..e9af3dd7c3 100644 --- a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/DiffableChange.tsx +++ b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/DiffableChange.tsx @@ -6,13 +6,8 @@ import { type FC, type ReactNode, } from 'react'; -import { Box, styled, Tab, Tabs, Tooltip, Typography } from '@mui/material'; -import { - Tab as BaseTab, - Tabs as BaseTabs, - TabPanel as BaseTabPanel, - TabsList as BaseTabsList, -} from '@mui/base'; +import { Box, styled, Tooltip, Typography } from '@mui/material'; +import { Tab, Tabs, TabsList, TabPanel } from '@mui/base'; import BlockIcon from '@mui/icons-material/Block'; import TrackChangesIcon from '@mui/icons-material/TrackChanges'; import { @@ -181,7 +176,7 @@ const tabA11yProps = (baseId: string) => (index: number) => ({ 'aria-controls': `${baseId}-${index}`, }); -const TabPanel: FC< +const TabPanelZ: FC< PropsWithChildren<{ index: number; value: number; @@ -225,129 +220,91 @@ const UpdateStrategy: FC<{ ); return ( - <> - - - - - + + + + + + - - - - -
- setTabIndex(newValue)} - > - - - + + +
+ + Change + Diff + + {actions} +
+ + theme.spacing(2), + marginBottom: (theme) => theme.spacing(2), + ...flexRow, + gap: (theme) => theme.spacing(1), + }} + > + This strategy will be{' '} + + + } + /> - {/* import {Tab as BaseTab, Tabs as BaseTabs, TabPanel as BaseTabPanel, TabsList as BaseTabsList} from '@mui/base'; */} - - setTabIndex(newValue)} - > - Change - Diff - - {actions} -
-
- theme.spacing(2), - marginBottom: (theme) => theme.spacing(2), - ...flexRow, - gap: (theme) => theme.spacing(1), - }} - > - This strategy will be{' '} - - - } - /> - - - {hasVariantDiff ? ( - - {change.payload.variants?.length ? ( - <> - - {currentStrategy?.variants?.length - ? 'Updating strategy variants to:' - : 'Adding strategy variants:'} - - - - ) : ( + + + {hasVariantDiff ? ( + + {change.payload.variants?.length ? ( + <> - Removed all strategy variants. + {currentStrategy?.variants?.length + ? 'Updating strategy variants to:' + : 'Adding strategy variants:'} - )} - - ) : null} - - - - - - - -
- + + + ) : ( + + Removed all strategy variants. + + )} + + ) : null} + + + + + ); };