import React from 'react'; import { Link } from 'react-router-dom'; import '../css/Card.css'; const Card = (props) => { /** * Card - A card box used to display information * Card requires a title and some jsx passed between the two Card tags as props. * You can add an image by adding an image prop in the form of a path to the file. * * title - title that will be displayed at the top of the card * image - picture displayed next to the tag * children - jsx that will be displayed in the content of the card * */ let scrollToTop = () => { window.scrollTo(0,0); }; return (
{props.link ? scrollToTop()}>{props.title} :
{props.title}
}
{props.children}
{ props.skills &&
Skills:
{ props.skills?props.skills.map(language=>
{language}
):"" }
}
{props.title}/
); }; export default Card;