@shopgate/engage
Version:
Shopgate's ENGAGE library.
5 lines • 891 B
JavaScript
import React from'react';import PropTypes from'prop-types';import{tableCell}from"./style";/**
* Renders a single properties row.
* @param {Object} props The component props.
* @return {JSX.Element}
*/var Row=function Row(_ref){var label=_ref.label,value=_ref.value,type=_ref.type;return React.createElement("tr",{className:"engage__product__product-property","data-type":type,"data-label":label,"aria-label":"".concat(typeof label==='string'?label:'',": ").concat(typeof value==='string'?value:''),tabIndex:0},React.createElement("td",{className:tableCell,"aria-hidden":true},React.createElement("span",{dangerouslySetInnerHTML:{__html:label}})),React.createElement("td",{className:tableCell,"data-test-id":"property: ".concat(value),"aria-hidden":true},React.createElement("span",{dangerouslySetInnerHTML:{__html:value}})));};Row.defaultProps={type:null};export default React.memo(Row);