Created
February 18, 2020 20:55
-
-
Save Kristian-Roopnarine/b7df156b3ec9742c050eabe9733b375a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ProjectCard = (props) => { | |
const renderDemoButton = () => { | |
if (props.demo === ""){ | |
return ( | |
<button className="ui disabled button"> | |
Demo | |
</button> | |
) | |
} else { | |
return ( | |
<a href={props.demo} target="_blank"> | |
<button className="ui button"> | |
Demo | |
</button> | |
</a> | |
) | |
} | |
} | |
return ( | |
<div className="card"> | |
<div className= "image"> | |
<img src={props.image} /> | |
</div> | |
<div className="content"> | |
<div className="header"> | |
{props.name} | |
</div> | |
<div className="description"> | |
<p>{props.description}</p> | |
</div> | |
</div> | |
<div className="extra content"> | |
<a href={props.github} target="_blank"> | |
<button className="ui button"> | |
Code | |
</button> | |
</a> | |
{renderDemoButton()} | |
</div> | |
</div> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment