diff --git a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/Change.styles.tsx b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/Change.styles.tsx index bb629e269f..7b6f878a3a 100644 --- a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/Change.styles.tsx +++ b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/Change.styles.tsx @@ -1,7 +1,40 @@ import { styled, Typography } from '@mui/material'; +import type { PropsWithChildren } from 'react'; -export const ChangeItemInfo = styled(Typography)(({ theme }) => ({ +const Action = styled(Typography)(({ theme }) => ({ + whiteSpace: 'nowrap', +})); + +export const Deleted = styled(Action)(({ theme }) => ({ + color: theme.palette.error.main, + '::before': { content: '"- "' }, +})); + +export const Added = styled(Action)(({ theme }) => ({ + '::before': { content: '"+ "' }, + color: theme.palette.success.dark, +})); + +export const AddedStrategy = styled(Added, { + shouldForwardProp: (prop) => prop !== 'disabled', +})<{ disabled?: boolean }>(({ theme, disabled }) => ({ + color: disabled ? theme.palette.text.disabled : undefined, +})); + +const Change = styled('span')({ + fontWeight: 'bold', +}); + +export const ChangeItemInfo = styled( + ({ children, ...props }: PropsWithChildren) => ( + + Change: + {children} + + ), +)(({ theme }) => ({ display: 'flex', + justifyItems: 'flex-start', flexFlow: 'row', alignItems: 'center', flex: 'auto', diff --git a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/StrategyChange.tsx b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/StrategyChange.tsx index 3e5eecc465..df44b44fc9 100644 --- a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/StrategyChange.tsx +++ b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/StrategyChange.tsx @@ -35,6 +35,7 @@ const ChangeItemCreateEditDeleteWrapper = styled(Box)(({ theme }) => ({ alignItems: 'center', marginBottom: theme.spacing(1), width: '100%', + flexFlow: 'row wrap', })); const StyledBox: FC<{ children?: React.ReactNode }> = styled(Box)( @@ -324,13 +325,13 @@ export const StrategyChange: FC<{ ); const actionsWithTabs = ( - <> +
Change View diff {actions} - +
); return (