@atlaskit/dynamic-table
Version:
A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.
38 lines (37 loc) • 2.01 kB
JavaScript
/* table.tsx generated by @compiled/babel-plugin v3.0.2 */
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["isFixedSize", "hasDataRow", "children", "testId", "isLoading"];
import "./table.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
/* eslint-disable @repo/internal/react/require-jsdoc */
import { forwardRef } from 'react';
var fixedSizeTableStyles = null;
var tableStyles = null;
var bodyBorder = null;
export var Table = /*#__PURE__*/forwardRef(function (_ref, ref) {
var isFixedSize = _ref.isFixedSize,
hasDataRow = _ref.hasDataRow,
children = _ref.children,
testId = _ref.testId,
isLoading = _ref.isLoading,
rest = _objectWithoutProperties(_ref, _excluded);
return /*#__PURE__*/React.createElement("table", _extends({
inert: isLoading ? '' : undefined,
style: {
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
'--local-dynamic-table-hover-bg': "var(--ds-background-neutral-subtle-hovered, #0515240F)",
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
'--local-dynamic-table-highlighted-bg': "var(--ds-background-selected, #E9F2FE)",
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
'--local-dynamic-table-hover-highlighted-bg': "var(--ds-background-selected-hovered, #CFE1FD)",
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
'--local-dynamic-table-row-focus-outline': "var(--ds-border-focused, #4688EC)"
},
ref: ref
}, rest, {
"data-testid": testId && "".concat(testId, "--table"),
className: ax(["_1bsb1osq _yq5hus1c _btyzidpf _ect4ttxp", isFixedSize && "_1kqm1n9t", hasDataRow && "_179r1uh4"])
}), children);
});