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 { 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<IArchiveFeatureChange> = ({
/**
* Deprecated: use ArchiveFeatureChange instead; remove with flag crDiffView
* @deprecated
*/
export const LegacyArchiveFeatureChange: FC<ArchiveFeatureChange> = ({
actions,
}) => (
<ChangeItemWrapper>
<LegacyChangeItemWrapper>
<ChangeItemInfo>
<ArchiveBox>Archiving flag</ArchiveBox>
{actions}
</ChangeItemInfo>
</ChangeItemWrapper>
</LegacyChangeItemWrapper>
);
export const ArchiveFeatureChange: FC<IArchiveFeatureChange> = ({
actions,
}) => (
export const ArchiveFeatureChange: FC<ArchiveFeatureChange> = ({ actions }) => (
<ChangeItemWrapper>
<ArchiveBox>Archiving flag</ArchiveBox>
{actions}

View File

@ -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',
});