@shopgate/engage
Version:
Shopgate's ENGAGE library.
5 lines • 1.01 kB
JavaScript
function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}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}
*/var Wrapper=function Wrapper(_ref){var children=_ref.children,dense=_ref.dense,groupName=_ref.groupName,htmlOnly=_ref.htmlOnly;return React.createElement("div",{className:cxs('engage__product__product-property-group',_defineProperty(_defineProperty({},container,!dense),containerDense,dense)),"data-group-name":groupName.toLowerCase()},htmlOnly?children:React.createElement("table",null,React.createElement("thead",null),React.createElement("tbody",null,children)));};Wrapper.defaultProps={dense:false,htmlOnly:false,groupName:''};export default React.memo(Wrapper);