
import React from 'react';
import PropTypes from 'prop-types';

const CardPrice = ({info}) =>
{
    return (       
        <div className="col-md-6">
            {console.log(info)}
        <div className="card card-body">
          <div className="row">
            <div className="col-md-5">
              {info.url !==undefined ? <img className="w-100" src={info.url} /> :''}
            </div>
            <div className="col-md-7">
                <h2 className="">{(info.name != undefined? info.name:'') }</h2>
                <p className="lead mb-0">{(info.rent != undefined? info.rent:'') }</p><br />
                <p className="text-muted">                
                        
                    <span>{info.details.rooms}, </span>
                    <span>{info.details.baths}, </span>
                    <span>{info.details.area}, </span>
                    <span>{info.details.available}, </span>
                
                </p>
            </div>
          </div>
        </div>
      </div>
    );
}

CardPrice.propTypes = {
    info: PropTypes.object,
}

export default CardPrice;