@atlaskit/table-tree
Version:
A table tree is an expandable table for showing nested hierarchies of information.
29 lines (28 loc) • 1.33 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["children", "singleLine", "indentLevel", "width", "className"];
import React from 'react';
import CommonCell from './internal/common-cell';
import OverflowContainer from './internal/overflow-container';
import withColumnWidth from './internal/with-column-width';
var CellComponent = function CellComponent(_ref) {
var children = _ref.children,
singleLine = _ref.singleLine,
indentLevel = _ref.indentLevel,
width = _ref.width,
className = _ref.className,
props = _objectWithoutProperties(_ref, _excluded);
return /*#__PURE__*/React.createElement(CommonCell, _extends({
indent: indentLevel ? "calc(".concat("var(--ds-space-300, 24px)", " * ", indentLevel, ")") : undefined,
width: width
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
,
className: className
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
}, props), /*#__PURE__*/React.createElement(OverflowContainer, {
isSingleLine: singleLine
}, children));
};
var Cell = withColumnWidth(CellComponent);
// eslint-disable-next-line @repo/internal/react/require-jsdoc
export default Cell;