@shopgate/engage
Version:
Shopgate's ENGAGE library.
8 lines • 1.16 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*as React from'react';import PropTypes from'prop-types';import classNames from'classnames';import{Grid}from'@shopgate/engage/components';import{detailsLine,detailsIcon,detailsIconLinked,details}from"./Store.style";/**
* Renders a single store headline.
* @param {Object} props The component props.
* @param {React.ReactElement} props.icon The icon component.
* @param {boolean} props.linked Whether the details should be linked.
* @param {React.ReactNode} props.children The component children.
* @returns {JSX.Element}
*/export function StoreDetailsLine(_ref){var Icon=_ref.icon,children=_ref.children,linked=_ref.linked;return React.createElement(Grid,{className:detailsLine},React.createElement(Grid.Item,{shrink:0,className:classNames(detailsIcon,_defineProperty({},detailsIconLinked,linked))},React.createElement(Icon,{"aria-hidden":true})),React.createElement(Grid.Item,{grow:1,className:details},children));}StoreDetailsLine.defaultProps={linked:false};