mirror of
https://github.com/fleetdm/fleet
synced 2026-05-02 19:07:38 +00:00
* rework data table, got to point of calling network request correctly * got to point of rendering table columns and data * finish up functional changes to data table * fix tests * fix styles for table container and data table * clean up some styles * update to styles for no host configured * cleanup and docs * add missing method for host table text formatting * disabling unused test. will add back in next PR * clean up code
21 lines
384 B
TypeScript
21 lines
384 B
TypeScript
import React from 'react';
|
|
|
|
interface ITextCellProps {
|
|
value: string | number;
|
|
formatter?: (val: any) => string;
|
|
}
|
|
|
|
const TextCell = (props: ITextCellProps): JSX.Element => {
|
|
const {
|
|
value,
|
|
formatter = val => val, // identity function if no formatter is provided
|
|
} = props;
|
|
|
|
return (
|
|
<span>
|
|
{formatter(value)}
|
|
</span>
|
|
);
|
|
};
|
|
|
|
export default TextCell;
|