1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-27 13:49:10 +02:00

update archive feature change

This commit is contained in:
Thomas Heartman 2025-07-02 13:22:35 +02:00
parent a54fc7c6d2
commit d94eed0844
2 changed files with 27 additions and 11 deletions

View File

@ -1,31 +1,37 @@
import type { FC, ReactNode } from 'react'; 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'; import { styled } from '@mui/material';
type ArchiveFeatureChange = {
actions?: ReactNode;
};
const ArchiveBox = styled('span')(({ theme }) => ({ const ArchiveBox = styled('span')(({ theme }) => ({
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
color: theme.palette.error.main, color: theme.palette.error.main,
})); }));
interface IArchiveFeatureChange { /**
actions?: ReactNode; * Deprecated: use ArchiveFeatureChange instead; remove with flag crDiffView
} * @deprecated
*/
export const LegacyArchiveFeatureChange: FC<IArchiveFeatureChange> = ({ export const LegacyArchiveFeatureChange: FC<ArchiveFeatureChange> = ({
actions, actions,
}) => ( }) => (
<ChangeItemWrapper> <LegacyChangeItemWrapper>
<ChangeItemInfo> <ChangeItemInfo>
<ArchiveBox>Archiving flag</ArchiveBox> <ArchiveBox>Archiving flag</ArchiveBox>
{actions} {actions}
</ChangeItemInfo> </ChangeItemInfo>
</ChangeItemWrapper> </LegacyChangeItemWrapper>
); );
export const ArchiveFeatureChange: FC<IArchiveFeatureChange> = ({ export const ArchiveFeatureChange: FC<ArchiveFeatureChange> = ({ actions }) => (
actions,
}) => (
<ChangeItemWrapper> <ChangeItemWrapper>
<ArchiveBox>Archiving flag</ArchiveBox> <ArchiveBox>Archiving flag</ArchiveBox>
{actions} {actions}

View File

@ -51,3 +51,13 @@ export const ChangeItemWrapper = styled('div')(({ theme }) => ({
alignItems: 'center', alignItems: 'center',
gap: theme.spacing(1), 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',
});