fleet/frontend/components/TableContainer/DataTable/StatusCell/StatusCell.tsx
Gabe Hernandez 64904d1d9b
implement manage teams page (#624)
* create skeleton of team management page and hook it up with routing

* added reducers and kolide api teams code, hooked up empty state

* request for get all teams and remove unused loading bar

* fix sending teams response to store

* added create team functionality|gs

* added edit and delete fuctionality to teams management

* fixed up some edge cases for deleting and editing teams

* remove unused UserRow

* get list of teams for user to add new users to, fix up Userform
2021-04-14 10:20:56 +01:00

27 lines
553 B
TypeScript

import React from 'react';
import classnames from 'classnames';
interface IStatusCellProps {
value: string;
}
const generateClassTag = (rawValue: string): string => {
return rawValue.replace(' ', '-').toLowerCase();
};
const StatusCell = (props: IStatusCellProps): JSX.Element => {
const { value } = props;
const statusClassName = classnames(
'data-table__status',
`data-table__status--${generateClassTag(value)}`,
);
return (
<span className={statusClassName}>
{value}
</span>
);
};
export default StatusCell;