@procore/core-react
Version:
React library of Procore Design Guidelines
68 lines • 3.28 kB
JavaScript
var _excluded = ["children"],
_excluded2 = ["children"],
_excluded3 = ["children"],
_excluded4 = ["children"],
_excluded5 = ["children"],
_excluded6 = ["children"];
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
import React from 'react';
import { addSubcomponents } from '../_utils/addSubcomponents';
import { StyledBodyCell, StyledBodyRow, StyledHead, StyledHeadCell, StyledShelf } from './TableShelf.styles';
export var Shelf = /*#__PURE__*/React.forwardRef(function Shelf(_ref, ref) {
var children = _ref.children,
props = _objectWithoutProperties(_ref, _excluded);
return /*#__PURE__*/React.createElement(StyledShelf, _extends({
ref: ref
}, props), children);
});
export var Head = /*#__PURE__*/React.forwardRef(function Head(_ref2, ref) {
var children = _ref2.children,
props = _objectWithoutProperties(_ref2, _excluded2);
return /*#__PURE__*/React.createElement(StyledHead, {
ref: ref
}, /*#__PURE__*/React.createElement(StyledBodyRow, props, children));
});
export var HeadCell = /*#__PURE__*/React.forwardRef(function HeadCell(_ref3, ref) {
var children = _ref3.children,
props = _objectWithoutProperties(_ref3, _excluded3);
return /*#__PURE__*/React.createElement(StyledHeadCell, _extends({
ref: ref
}, props), children);
});
export var Body = /*#__PURE__*/React.forwardRef(function Body(_ref4, ref) {
var children = _ref4.children,
props = _objectWithoutProperties(_ref4, _excluded4);
return /*#__PURE__*/React.createElement("div", _extends({
ref: ref
}, props), children);
});
export var BodyCell = /*#__PURE__*/React.forwardRef(function BodyCell(_ref5, ref) {
var children = _ref5.children,
props = _objectWithoutProperties(_ref5, _excluded5);
return /*#__PURE__*/React.createElement(StyledBodyCell, _extends({
ref: ref
}, props), children);
});
export var BodyRow = /*#__PURE__*/React.forwardRef(function BodyRow(_ref6, ref) {
var children = _ref6.children,
props = _objectWithoutProperties(_ref6, _excluded6);
return /*#__PURE__*/React.createElement(StyledBodyRow, _extends({
ref: ref
}, props), children);
});
Shelf.displayName = 'Shelf';
Body.displayName = 'Shelf.Body';
BodyCell.displayName = 'Shelf.BodyCell';
BodyRow.displayName = 'Shelf.BodyRow';
Head.displayName = 'Shelf.Head';
HeadCell.displayName = 'Shelf.HeadCell';
export var TableShelf = addSubcomponents({
Body: Body,
BodyCell: BodyCell,
BodyRow: BodyRow,
Head: Head,
HeadCell: HeadCell
}, Shelf);
//# sourceMappingURL=TableShelf.js.map