website/src/components/item.tsx

19 lines
444 B
TypeScript
Raw Normal View History

2020-11-28 00:39:21 +00:00
import React from 'react';
import style from './item.module.css';
import { Link } from 'gatsby';
2020-11-27 16:08:32 +00:00
2020-11-28 05:07:26 +00:00
interface ItemProps {
to: string;
title: string;
subtitle?: string;
}
export default (props: ItemProps): JSX.Element => (
2020-11-28 20:50:20 +00:00
<article className={style.projectItem}>
<Link to={props.to}>
<h3 className={style.projectTitle}>{props.title}</h3>
</Link>
2020-11-27 16:08:32 +00:00
<p className={style.projectSubtitle}>{props.subtitle}</p>
2020-11-28 20:50:20 +00:00
</article>
2020-11-28 00:39:21 +00:00
);