From d94eed0844bf30ebba65eee4dcf2910568387084 Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Wed, 2 Jul 2025 13:22:35 +0200 Subject: [PATCH] update archive feature change --- .../Changes/Change/ArchiveFeatureChange.tsx | 28 +++++++++++-------- .../Changes/Change/Change.styles.tsx | 10 +++++++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ArchiveFeatureChange.tsx b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ArchiveFeatureChange.tsx index 0cc814ef0d..330ff281fd 100644 --- a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ArchiveFeatureChange.tsx +++ b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ArchiveFeatureChange.tsx @@ -1,31 +1,37 @@ import type { FC, ReactNode } from 'react'; -import { ChangeItemInfo, ChangeItemWrapper } from './Change.styles.tsx'; +import { + ChangeItemInfo, + ChangeItemWrapper, + LegacyChangeItemWrapper, +} from './Change.styles.tsx'; import { styled } from '@mui/material'; +type ArchiveFeatureChange = { + actions?: ReactNode; +}; + const ArchiveBox = styled('span')(({ theme }) => ({ display: 'flex', alignItems: 'center', color: theme.palette.error.main, })); -interface IArchiveFeatureChange { - actions?: ReactNode; -} - -export const LegacyArchiveFeatureChange: FC = ({ +/** + * Deprecated: use ArchiveFeatureChange instead; remove with flag crDiffView + * @deprecated + */ +export const LegacyArchiveFeatureChange: FC = ({ actions, }) => ( - + Archiving flag {actions} - + ); -export const ArchiveFeatureChange: FC = ({ - actions, -}) => ( +export const ArchiveFeatureChange: FC = ({ actions }) => ( Archiving flag {actions} 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 7ba979b1bd..ce79bbec0b 100644 --- a/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/Change.styles.tsx +++ b/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/Change.styles.tsx @@ -51,3 +51,13 @@ export const ChangeItemWrapper = styled('div')(({ theme }) => ({ alignItems: 'center', gap: theme.spacing(1), })); + +/** + * Deprecated: use ChangeItemWrapper instead; remove with flag crDiffView + * @deprecated + */ +export const LegacyChangeItemWrapper = styled('span')({ + display: 'flex', + justifyContent: 'space-between', + alignItems: 'center', +});