page update

This commit is contained in:
tmshv committed 2020-03-03 02:25:37 +03:00
1 parent ee5cba3634
commit 9a105ba45e
8 files changed
+66 -34

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import './styles.css'
import { dateFormat } from 'src/lib/date'
import { ITag } from 'src/types'
import { TagList } from '../TagList'
export type PageMetaProps = {
style?: React.CSSProperties
date?: Date
tags?: ITag[]
}
export const PageMeta: React.FC<PageMetaProps> = props => (
<header className={'pageMeta'} style={props.style}>
{!props.date ? null : (
<p className={'date'}>Опубликовано: {dateFormat(props.date)}</p>
)}
{!(props.tags.length) ? null : (
<TagList items={props.tags} />
)}
</header>
)
+5
View File
@@ -0,0 +1,5 @@
.pageMeta {
display: flex;
align-items: center;
justify-content: space-between;
}