import React, { FunctionComponent } from "react";

type Props = { title: string; value: string; link: string; rest?: {} };

export const InfoPill: FunctionComponent<Props> = ({ title, value, link, ...rest }) => {
  return (
    <li>
      <div className="p-info">
        <em>{title}</em>
        <span>
          {link !== undefined ? (
            <a href={link} {...rest}>
              {value}
            </a>
          ) : (
            value
          )}
        </span>
      </div>
    </li>
  );
};
