This repository has been archived on 2022-10-07. You can view files and clone it, but cannot push or open issues or pull requests.
skynet-webportal/packages/website/src/components/News/News.js

15 lines
548 B
JavaScript
Raw Normal View History

2021-03-31 22:37:02 +00:00
import * as React from "react";
import { GatsbyImage, getImage } from "gatsby-plugin-image";
export function NewsSummary({ avatar, author, date }) {
2021-03-31 22:37:02 +00:00
return (
<div className="flex space-x-4">
2021-04-01 16:36:16 +00:00
{avatar && <GatsbyImage image={getImage(avatar)} alt={author || "Skynet Labs"} className="rounded-full" />}
2021-03-31 22:37:02 +00:00
<div className="flex flex-col text-xs justify-around h-10">
2021-04-01 16:36:16 +00:00
<div className="text-palette-600">{author || "Skynet Labs"}</div>
2021-03-31 22:37:02 +00:00
{date && <div className="text-palette-400">{date}</div>}
</div>
</div>
);
}