Listing 10-2: Including CSS in a Component
import "styles.css";
function ArticleLink(props){
return (
<div className="article-link">
<h1 className="title">{props.title}</h1>
<p className="firstPara">{props.firstPararaph}</p>
<p><a className="articleLink" href={props.link}>read more</a></p>
</div>
);
}
export default ArticleLink;
Download the examples, report issues, and ask/answer questions in the discussion area by visiting the book's github page. All of the code for the book is also available on codesandbox.io for you to play around with.
ReactJS Foundations is published by John Wiley and Sons, Inc and is available in paperback and eBook.