mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
17 lines
364 B
TypeScript
17 lines
364 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;
|