mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
705462f0cf
## About the changes Creating the first version of the Dark theme Refactor: colors variables Refactor: use theme variable instead - this change will help us to use MuiCssBaseline, and we can use classes directly for easy customization when we can't identify MUI classes Refactor: adjusting some files components - i’ve touched also the structure of some files, not only the colors variables (but only to adjust the style, not functionality) Fix: dark mode persistence on refresh (by Nuno) Feat: dark mode sees light logos, and light mode sees dark logos (by Nuno) --------- Co-authored-by: Nuno Góis <github@nunogois.com>
29 lines
642 B
TypeScript
29 lines
642 B
TypeScript
import { Badge } from 'component/common/Badge/Badge';
|
|
|
|
interface IStatusChip {
|
|
stale: boolean;
|
|
showActive?: boolean;
|
|
}
|
|
|
|
export const FeatureStatusChip = ({
|
|
stale,
|
|
showActive = true,
|
|
}: IStatusChip) => {
|
|
if (!stale && !showActive) {
|
|
return null;
|
|
}
|
|
|
|
const title = stale
|
|
? 'Feature toggle is deprecated.'
|
|
: 'Feature toggle is active.';
|
|
const value = stale ? 'Stale' : 'Active';
|
|
|
|
return (
|
|
<div data-loading style={{ marginLeft: '8px' }}>
|
|
<Badge color={stale ? 'error' : 'success'} title={title}>
|
|
{value}
|
|
</Badge>
|
|
</div>
|
|
);
|
|
};
|