2021-02-02 06:28:00 +01:00
|
|
|
import React from 'react';
|
2021-02-04 06:42:15 +01:00
|
|
|
import { IAuthor } from '../../../types/cms';
|
2021-02-02 06:28:00 +01:00
|
|
|
import { Avatar } from '../../Avatar';
|
2021-01-22 03:43:42 +01:00
|
|
|
|
|
|
|
interface Props {
|
|
|
|
author: IAuthor;
|
2021-01-29 03:50:49 +01:00
|
|
|
publishedDate: string;
|
2021-01-22 03:43:42 +01:00
|
|
|
}
|
|
|
|
|
2021-01-29 03:50:49 +01:00
|
|
|
export function ArticleWidgetAuthor({ author, publishedDate }: Props) {
|
2021-01-22 03:43:42 +01:00
|
|
|
return (
|
|
|
|
<div className="flex items-center space-x-3">
|
2021-02-02 06:28:00 +01:00
|
|
|
<Avatar size={10} imageSrc={author?.avatar.imageUrl} />
|
2021-01-22 03:43:42 +01:00
|
|
|
|
|
|
|
<div className="flex flex-col leading-tight">
|
2021-02-08 07:37:50 +01:00
|
|
|
<span className="text-sm font-bold tracking-wider font-sans">
|
2021-01-31 11:02:19 +01:00
|
|
|
By: {author?.name}
|
2021-01-22 03:43:42 +01:00
|
|
|
</span>
|
2021-01-29 03:50:49 +01:00
|
|
|
<span>{publishedDate}</span>
|
2021-01-22 03:43:42 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|