fido-node.github.io/components/post-overview/elements/NameAndData.tsx

17 lines
400 B
TypeScript
Raw Normal View History

2021-05-07 21:00:01 +03:00
import { DateTime } from 'luxon';
import * as React from 'react';
type Props = {
name: string;
date: DateTime;
};
export default ({ name, date }: Props) => (
<div className="flex-row pt-1 text-gray-500">
<div className={'hover:text-black'}>{name}</div>
<div className={'text-sm hover:text-black'}>
{date.toLocaleString({ month: 'long', day: 'numeric' })}
</div>
</div>
);