
import React from 'react';
import PropTypes from 'prop-types';
import { createNamespace } from '../../../tools/namingTools';

const n = createNamespace('CompareProductSpecifications');

export const CompareProductSpecifications = ({ specification }) => (
    <React.Fragment>
        {specification && <p {...n('text').withTestId().props}>{specification}</p>}
    </React.Fragment>
);

CompareProductSpecifications.isRenderable = item => item.specifications && item.specifications.length;

CompareProductSpecifications.propTypes = {
    specification: PropTypes.string
};

CompareProductSpecifications.defaultProps = {
    specification: ''
};
