import React, { forwardRef } from "react"; import { cl } from "../../../utils/helpers"; import { useDataTableContext } from "../root/DataTableRoot.context"; type DataTableTrProps = React.HTMLAttributes & { selected?: boolean; }; const DataTableTr = forwardRef( ({ className, children, selected = false, ...rest }, forwardedRef) => { const { layout } = useDataTableContext(); const renderFillerCell = layout === "fixed" && children; return ( {children} {renderFillerCell && ( /* TODO: Consider chaning between th and td based on context */ /* using div causes illegal dom structure */ )} ); }, ); export { DataTableTr }; export type { DataTableTrProps };