Files
hudozka/src/components/PageHeader/index.tsx
T
2019-10-17 15:25:23 +03:00

23 lines
515 B
TypeScript

import * as React from 'react'
import { dateFormat } from '../../lib/date'
export interface IPageHeaderProps {
tags?: string[]
date?: Date
title: string
}
export const PageHeader: React.FC<IPageHeaderProps> = props => (
<header className="Article-Head">
<h1>{props.title}</h1>
{!props.date ? null : (
<p className="date">{dateFormat(props.date)}</p>
)}
{/* {!(tags.length) ? null : (
<TagList tags={tags} />
)} */}
</header>
)