@atlaskit/table-tree
Version:
A table tree is an expandable table for showing nested hierarchies of information.
26 lines (25 loc) • 966 B
JavaScript
import _extends from "@babel/runtime/helpers/extends";
import React from 'react';
import CommonCell from './internal/common-cell';
import OverflowContainer from './internal/overflow-container';
import withColumnWidth from './internal/with-column-width';
const CellComponent = ({
children,
singleLine,
indentLevel,
width,
className,
...props
}) => /*#__PURE__*/React.createElement(CommonCell, _extends({
indent: indentLevel ? `calc(${"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));
const Cell = withColumnWidth(CellComponent);
// eslint-disable-next-line @repo/internal/react/require-jsdoc
export default Cell;