-
Notifications
You must be signed in to change notification settings - Fork 1
/
post-detail.js
65 lines (57 loc) · 1.17 KB
/
post-detail.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import PropTypes from 'prop-types'
import { css } from '@emotion/core'
import Shell from './shell'
import Header from './header'
import Content from './content'
import ListItemHeader from './list-item-header'
const postStyle = css`
/* Looks like h3 */
h1 {
font-size: 1.953rem;
letter-spacing: -0.09rem;
line-height: 1.2;
}
/* Looks like h6 */
h2 {
font-size: 1rem;
letter-spacing: 0;
line-height: 1.5;
margin-top: 3.815rem;
}
img {
max-width: 100%;
border-radius: 10px
}
video {
border-radius: 10px;
}
`
const postHeaderStyle = css`
margin-bottom: 3.815rem;
`
function PostDetail ({ children, meta }) {
return (
<Shell>
<Header pageName="/ Posts" />
<Content>
<div css={postStyle}>
<ListItemHeader
title={meta.title}
subtitle={meta.dateString}
innerCss={postHeaderStyle}
/>
{children}
</div>
</Content>
</Shell>
)
}
PostDetail.propTypes = {
children: PropTypes.node,
meta: PropTypes.shape({
title: PropTypes.string,
link: PropTypes.string,
dateString: PropTypes.string
})
}
export default PostDetail