import React from "react"; import { DataTable as CarbonDataTable, DataTableHeader as CarbonDataTableHeader, DataTableProps as CarbonDataTableProps, DataTableRow as CarbonDataTableRow, } from "@carbon/react"; import { TableContainerProps as CarbonTableContainerProps } from "@carbon/react/es/components/DataTable/TableContainer"; import { CLASSPREFIX as eccgui } from "../../configuration/constants"; import { TableProps, tableRowHeightSizes } from "./Table"; export interface TableDataContainerProps extends Omit< CarbonDataTableProps< Array>, "cells">>, Array >, "size" | "overflowMenuOnHover" | "stickyHeader" | "useStaticWidth" >, Omit, "children"> { children(signature: any): React.JSX.Element; size?: TableProps["size"]; } export interface TableSimpleContainerProps extends Omit, React.HTMLAttributes { children?: React.JSX.Element; } export type TableContainerProps = TableDataContainerProps | TableSimpleContainerProps; export function TableContainer({ className = "", ...otherProps }: TableContainerProps) { const otherDataTableProps = otherProps as TableDataContainerProps; return !!otherDataTableProps.headers || !!otherDataTableProps.rows ? ( ) : ( ); } export default TableContainer;