import React from "react"; import classnames from "classnames"; import { buildAriaProps, buildDataProps, buildHtmlProps, } from "../../utilities/props"; import { globalProps } from "../../utilities/globalProps"; type TableCellPropTypes = { aria?: { [key: string]: string }; children: React.ReactNode[] | React.ReactNode; className: string; data?: { [key: string]: string }; htmlOptions?: { [key: string]: string | number | boolean | (() => void) }; id?: string; tag?: "table" | "div"; text?: string }; const TableCell = (props: TableCellPropTypes) => { const { aria = {}, children, className, data = {}, htmlOptions = {}, id, tag = "table", text, } = props; const ariaProps = buildAriaProps(aria); const dataProps = buildDataProps(data); const htmlProps = buildHtmlProps(htmlOptions); const classes = classnames("pb_table_td", globalProps(props), className); const isTableTag = tag === "table"; return ( <> {isTableTag ? (