@atlaskit/dynamic-table
Version:
A dynamic table displays rows of data with built-in pagination, sorting, and re-ordering functionality.
42 lines (40 loc) • 2.47 kB
JavaScript
/* table-row.tsx generated by @compiled/babel-plugin v3.0.2 */
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TableBodyRow = void 0;
require("./table-row.compiled.css");
var _react = _interopRequireWildcard(require("react"));
var React = _react;
var _runtime = require("@compiled/react/runtime");
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var _excluded = ["isHighlighted", "children", "style", "testId", "className"];
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var rowStyles = null;
var rowBackgroundStyles = null;
var rowHighlightedBackgroundStyles = null;
// eslint-disable-next-line @repo/internal/react/require-jsdoc
var TableBodyRow = exports.TableBodyRow = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
var isHighlighted = _ref.isHighlighted,
children = _ref.children,
style = _ref.style,
testId = _ref.testId,
className = _ref.className,
rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
return /*#__PURE__*/React.createElement("tr", (0, _extends2.default)({
style: style,
/**
* We rely on this `className` for the `RankableTableBodyRow` to apply extra styles.
* With Compiled it needs to be statically analyzable. It does not get applied via spread props.
*/
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
className: (0, _runtime.ax)(["_bfhksm61 _1ygbdfik _1ah312gs", isHighlighted ? "_bfhk15s3 _irr3ufnl" : "_irr31dpa", className])
}, rest, {
ref: ref,
"data-testid": testId
}), children);
});