2018-11-01 13:05:39 +00:00
|
|
|
import React from 'react'
|
|
|
|
import { StyleSheet, StyleResolver } from 'style-sheet'
|
|
|
|
const cls = StyleResolver.resolve
|
|
|
|
|
|
|
|
export default () => (
|
|
|
|
<div className={cls([styles.root, styles.color])}>
|
2018-12-17 16:34:32 +00:00
|
|
|
<div>
|
|
|
|
Hello from <span className={cls(styles.brand)}>Next.js</span>
|
|
|
|
</div>
|
2018-11-01 13:05:39 +00:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
root: {
|
|
|
|
fontSize: 30,
|
|
|
|
fontFamily: 'sans-serif',
|
|
|
|
display: 'flex',
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center',
|
|
|
|
minHeight: '100vh',
|
2018-12-17 16:34:32 +00:00
|
|
|
backgroundImage:
|
|
|
|
'radial-gradient(circle, #D7D7D7, #D7D7D7 1px, #FFF 1px, #FFF)',
|
2018-11-01 13:05:39 +00:00
|
|
|
backgroundSize: '1em 1em'
|
|
|
|
},
|
|
|
|
color: {
|
|
|
|
// showcasing dynamic styles
|
|
|
|
color: Math.random() > 0.5 ? '#111' : '#222'
|
|
|
|
},
|
|
|
|
brand: {
|
|
|
|
fontWeight: 'bold'
|
|
|
|
}
|
|
|
|
})
|