1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-11-10 01:19:53 +01:00
unleash.unleash/frontend/src/component/changeRequest/ChangeRequest/Changes/Change/ToggleStatusChange.tsx
Gastón Fournier abe160eb7d
feat: Unleash v7 ESM migration (#9877)
We're migrating to ESM, which will allow us to import the latest
versions of our dependencies.

Co-Authored-By: Christopher Kolstad <chriswk@getunleash.io>
2025-05-14 09:47:12 +02:00

30 lines
844 B
TypeScript

import type { ReactNode, VFC } from 'react';
import { Box } from '@mui/material';
import { Badge } from 'component/common/Badge/Badge';
import { ChangeItemWrapper } from './StrategyChange.tsx';
interface IToggleStatusChange {
enabled: boolean;
actions?: ReactNode;
}
export const ToggleStatusChange: VFC<IToggleStatusChange> = ({
enabled,
actions,
}) => {
return (
<ChangeItemWrapper>
<Box sx={{ display: 'flex', alignItems: 'center' }}>
New status:{' '}
<Badge
sx={(theme) => ({ marginLeft: theme.spacing(1) })}
color={enabled ? 'success' : 'error'}
>
{enabled ? ' Enabled' : 'Disabled'}
</Badge>
</Box>
{actions}
</ChangeItemWrapper>
);
};