import React from 'react';
import { getImageUrl } from 'educoder';
import { Link } from 'react-router-dom';
import './Component.scss';

function Cards({img , title, desc , rightBtn , src}){
  return(
    <div className="cards">
      {img &&<div className="img"><img src={getImageUrl(`/${img}`)} alt=""/></div>}
      <div className="content">
        <p className="titles">
          <Link to={src}>{title}</Link>
          {rightBtn}
        </p>
        <div className="desc">
          {desc}
        </div>
      </div>
    </div>
  )
}
export default Cards;