portfolio/src/components/subcomponents/Topic.js

31 lines
904 B
JavaScript

import React from 'react';
import '../css/Topic.css';
const Card = (props) => {
/**
* Topic - A window to contain topics for the intro component. Topic requires a title and some
* jsx passed between the two Card tags as props.
*
* title - title that will be displayed at the top of the card
* children - jsx that will be displayed in the content of the card
* background - a url to the background image
*
*/
return (
<a
href={props.link}
className="topic"
style={{backgroundImage: props.background ? `url(${props.background})`:''}}
>
<div className="content">
<h1 className="title">{props.title}</h1>
<div className="children">
{props.children}
</div>
</div>
</a>
);
};
export default Card;