/* eslint-disable react/prop-types */ import React from "react"; import { Cell } from "react-table"; import { IDataColumn } from "interfaces/datatable_config"; // @ts-ignore import TextCell from "components/TableContainer/DataTable/TextCell"; import StatusCell from "components/TableContainer/DataTable/StatusCell/StatusCell"; import RemoveIcon from "../../../assets/images/icon-action-remove-20x20@2x.png"; // NOTE: cellProps come from react-table // more info here https://react-table.tanstack.com/docs/api/useTable#cell-properties export const generateTableHeaders = (showDelete: boolean): IDataColumn[] => { const deleteHeader = showDelete ? [ { id: "delete", Header: "", Cell: (cellProps: Cell): JSX.Element => (