1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00
unleash.unleash/frontend/src/component/feature/FeatureToggleList/FeatureStaleCell/FeatureStaleCell.tsx
Tymoteusz Czech a11cb72d99 Persistent table query (#999)
* feat: persistent table query

* project overview sort query

* refactor: api methods as hook callbacks

* persitent columns in project overview

* enable new project overview

* fix: refactor feature state change in overview

* add type to sort

* update e2e tests

now takes 10% less time with use of cypress session

* prevent sort reset on features list

* fix feature toggle list loading

* fix: update column state saving

* update local storage hook test
2022-05-25 08:14:22 +00:00

24 lines
677 B
TypeScript

import { VFC } from 'react';
import { Box, Typography } from '@mui/material';
import { useStyles } from './FeatureStaleCell.styles';
import classnames from 'classnames';
interface IFeatureStaleCellProps {
value?: boolean;
}
export const FeatureStaleCell: VFC<IFeatureStaleCellProps> = ({ value }) => {
const { classes: styles } = useStyles();
return (
<Box sx={{ py: 1.5, px: 2 }}>
<Typography
component="span"
className={classnames(styles.status, value && styles.stale)}
data-loading
>
{value ? 'Stale' : 'Active'}
</Typography>
</Box>
);
};