UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

25 lines (24 loc) 946 B
import { jsx as t } from "react/jsx-runtime"; import { Skeleton as r } from "@mui/material"; import { flexRender as l } from "@tanstack/react-table"; import m from "../SynapseTable/ExpandableTableDataCell.js"; import { getCommonPinningStyles as d, getColumnSizeCssVariable as i } from "./TanStackTableUtils.js"; function f(e) { const n = e.getContext().table.options.meta?.getWrapInExpandableTd, a = n && n(e) ? m : "td", o = e.getContext().table.options.meta?.renderPlaceholderData; return /* @__PURE__ */ t( a, { style: { width: `calc(var(${i(e.column.id)}) * 1px)`, textAlign: e.column.columnDef.meta?.textAlign, ...d(e.column) }, children: o ? /* @__PURE__ */ t("p", { children: /* @__PURE__ */ t(r, { width: "80%", height: "20px" }) }) : l(e.column.columnDef.cell, e.getContext()) }, e.id ); } export { f as TableCellRenderer }; //# sourceMappingURL=TableCellRenderer.js.map