page update
This commit is contained in:
1 parent
ee5cba3634
commit
9a105ba45e
8 files changed
+66
-34
No files matched your search
@@ -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>
|
||||
)
|
||||
@@ -0,0 +1,5 @@
|
||||
.pageMeta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
Reference in new issue
Block a user