import React from 'react';
import style from './item.module.css';
import { Link } from 'gatsby';

interface ItemProps {
  to: string;
  title: string;
  subtitle?: string;
}

export default (props: ItemProps): JSX.Element => (
  <Link to={props.to} className={style.projectItem}>
    <h3 className={style.projectTitle}>{props.title}</h3>
    <p className={style.projectSubtitle}>{props.subtitle}</p>
  </Link>
);
