UNPKG

@shopgate/engage

Version:
34 lines (33 loc) 913 B
import React from 'react'; import PropTypes from 'prop-types'; import cxs from 'classnames'; import { container, containerDense } from "./style"; /** * Renders the general properties wrapper table. * @param {Object} props The component props. * @returns {JSX.Element} */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; const Wrapper = ({ children, dense, groupName, htmlOnly }) => /*#__PURE__*/_jsx("div", { className: cxs('engage__product__product-property-group', { [container]: !dense, [containerDense]: dense }), "data-group-name": groupName.toLowerCase(), children: htmlOnly ? children : /*#__PURE__*/_jsxs("table", { children: [/*#__PURE__*/_jsx("thead", {}), /*#__PURE__*/_jsx("tbody", { children: children })] }) }); Wrapper.defaultProps = { dense: false, htmlOnly: false, groupName: '' }; export default /*#__PURE__*/React.memo(Wrapper);