All files / components/profile-card profile-info-blocks.jsx

100% Statements 5/5
100% Branches 0/0
100% Functions 2/2
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33          1x 1x                 1x               1x       1x          
import React from 'react';
import PropTypes from 'prop-types';
 
class ProfileInfoBlocks extends React.Component {
  render() {
    const descriptionBlocks = this.props.blocks.map((info, i) => {
      return (
        <div className="col-sm-4 border-right" key={i}>
          <div className="description-block">
            <h5 className="description-header">{info.stats}</h5>
            <span className="description-text">{info.description}</span>
          </div>
        </div>
      );
    });
    return (
      <div className="row">
        {descriptionBlocks}
      </div>
    );
  }
}
 
ProfileInfoBlocks.propTypes = {
  blocks: PropTypes.array
};
 
ProfileInfoBlocks.defaultProps = {
  blocks: []
};
 
export default ProfileInfoBlocks;