import React, { FunctionComponent } from "react";

type Props = { title: string; start: string; end: string; image: string };

export const ResumeItem: FunctionComponent<Props> = ({ title, start, end, image, children }) => {
  return (
    <li>
      {image && <img src={image} alt={`${title} - image`} />}
      <h5>{title}</h5>
      <span className="year">
        <i className="fa fa-calendar" /> {start} - {end}
      </span>
      {children}
    </li>
  );
};
