1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/examples/nested-components/pages/index.js
Dan Zajdband e164074f8e Added glamor css (#38)
* Added glamor css

* Using pseudoclasses instead of calling functions

* Updated readme using style instead of default import for css
2016-10-21 09:39:20 -07:00

49 lines
905 B
JavaScript

import React from 'react'
import P from '../components/paragraph'
import Post from '../components/post'
import { style } from 'next/css'
export default () => (
<div className={styles.main}>
<Post title='My first blog post'>
<P>Hello there</P>
<P>This is an example of a componentized blog post</P>
</Post>
<Hr />
<Post title='My second blog post'>
<P>Hello there</P>
<P>This is another example.</P>
<P>Wa-hoo!</P>
</Post>
<Hr />
<Post title='The final blog post'>
<P>C'est fin</P>
</Post>
</div>
)
const Hr = () => <hr className={styles.hr} />
const styles = {
main: style({
margin: 'auto',
maxWidth: '420px',
padding: '10px'
}),
hr: style({
width: '100px',
borderWidth: 0,
margin: '20px auto',
textAlign: 'center',
'::before': {
content: '"***"',
color: '#ccc'
}
})
}