mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-15 17:50:48 +02:00
flag archive flag change
This commit is contained in:
parent
d60b4f1592
commit
a54fc7c6d2
@ -1,6 +1,6 @@
|
|||||||
import type { FC, ReactNode } from 'react';
|
import type { FC, ReactNode } from 'react';
|
||||||
import { styled } from '@mui/material';
|
|
||||||
import { ChangeItemInfo, ChangeItemWrapper } from './Change.styles.tsx';
|
import { ChangeItemInfo, ChangeItemWrapper } from './Change.styles.tsx';
|
||||||
|
import { styled } from '@mui/material';
|
||||||
|
|
||||||
const ArchiveBox = styled('span')(({ theme }) => ({
|
const ArchiveBox = styled('span')(({ theme }) => ({
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@ -12,7 +12,7 @@ interface IArchiveFeatureChange {
|
|||||||
actions?: ReactNode;
|
actions?: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ArchiveFeatureChange: FC<IArchiveFeatureChange> = ({
|
export const LegacyArchiveFeatureChange: FC<IArchiveFeatureChange> = ({
|
||||||
actions,
|
actions,
|
||||||
}) => (
|
}) => (
|
||||||
<ChangeItemWrapper>
|
<ChangeItemWrapper>
|
||||||
@ -22,3 +22,12 @@ export const ArchiveFeatureChange: FC<IArchiveFeatureChange> = ({
|
|||||||
</ChangeItemInfo>
|
</ChangeItemInfo>
|
||||||
</ChangeItemWrapper>
|
</ChangeItemWrapper>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
export const ArchiveFeatureChange: FC<IArchiveFeatureChange> = ({
|
||||||
|
actions,
|
||||||
|
}) => (
|
||||||
|
<ChangeItemWrapper>
|
||||||
|
<ArchiveBox>Archiving flag</ArchiveBox>
|
||||||
|
{actions}
|
||||||
|
</ChangeItemWrapper>
|
||||||
|
);
|
||||||
|
@ -11,7 +11,10 @@ import { ToggleStatusChange } from './ToggleStatusChange.tsx';
|
|||||||
import { LegacyStrategyChange } from './LegacyStrategyChange.tsx';
|
import { LegacyStrategyChange } from './LegacyStrategyChange.tsx';
|
||||||
import { VariantPatch } from './VariantPatch/VariantPatch.tsx';
|
import { VariantPatch } from './VariantPatch/VariantPatch.tsx';
|
||||||
import { EnvironmentStrategyExecutionOrder } from './EnvironmentStrategyExecutionOrder/EnvironmentStrategyExecutionOrder.tsx';
|
import { EnvironmentStrategyExecutionOrder } from './EnvironmentStrategyExecutionOrder/EnvironmentStrategyExecutionOrder.tsx';
|
||||||
import { ArchiveFeatureChange } from './ArchiveFeatureChange.tsx';
|
import {
|
||||||
|
ArchiveFeatureChange,
|
||||||
|
LegacyArchiveFeatureChange,
|
||||||
|
} from './ArchiveFeatureChange.tsx';
|
||||||
import { DependencyChange } from './DependencyChange.tsx';
|
import { DependencyChange } from './DependencyChange.tsx';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { LegacyReleasePlanChange } from './LegacyReleasePlanChange.tsx';
|
import { LegacyReleasePlanChange } from './LegacyReleasePlanChange.tsx';
|
||||||
@ -100,6 +103,10 @@ export const FeatureChange: FC<{
|
|||||||
? ReleasePlanChange
|
? ReleasePlanChange
|
||||||
: LegacyReleasePlanChange;
|
: LegacyReleasePlanChange;
|
||||||
|
|
||||||
|
const ArchiveFlagComponent = useDiffableChangeComponent
|
||||||
|
? ArchiveFeatureChange
|
||||||
|
: LegacyArchiveFeatureChange;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<StyledSingleChangeBox
|
<StyledSingleChangeBox
|
||||||
key={objectId(change)}
|
key={objectId(change)}
|
||||||
@ -173,7 +180,7 @@ export const FeatureChange: FC<{
|
|||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{change.action === 'archiveFeature' && (
|
{change.action === 'archiveFeature' && (
|
||||||
<ArchiveFeatureChange actions={actions} />
|
<ArchiveFlagComponent actions={actions} />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{change.action === 'addStrategy' ||
|
{change.action === 'addStrategy' ||
|
||||||
|
Loading…
Reference in New Issue
Block a user