2017-01-23 23:29:15 +00:00
|
|
|
import { createComponent } from 'react-fela'
|
2018-03-06 13:27:47 +00:00
|
|
|
|
|
|
|
import FelaProvider from '../FelaProvider'
|
2017-01-23 23:29:15 +00:00
|
|
|
|
2017-06-28 17:14:18 +00:00
|
|
|
const Container = createComponent(() => ({
|
|
|
|
maxWidth: 700,
|
|
|
|
marginLeft: 'auto',
|
|
|
|
marginRight: 'auto',
|
|
|
|
lineHeight: 1.5
|
|
|
|
}))
|
2017-01-23 23:29:15 +00:00
|
|
|
|
2017-06-28 17:14:18 +00:00
|
|
|
const Text = createComponent(({ size = 16 }) => ({
|
|
|
|
fontFamily:
|
|
|
|
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
|
|
fontSize: size,
|
|
|
|
color: '#333'
|
|
|
|
}))
|
2017-01-23 23:29:15 +00:00
|
|
|
|
2017-06-28 17:14:18 +00:00
|
|
|
const Title = createComponent(
|
|
|
|
({ size = 24 }) => ({
|
|
|
|
fontSize: size,
|
|
|
|
color: '#555'
|
|
|
|
}),
|
2018-03-06 13:27:47 +00:00
|
|
|
Text
|
2017-06-28 17:14:18 +00:00
|
|
|
)
|
|
|
|
|
2018-03-06 13:27:47 +00:00
|
|
|
export default () => (
|
|
|
|
<FelaProvider>
|
2017-06-28 17:14:18 +00:00
|
|
|
<Container>
|
|
|
|
<Title size={50}>My Title</Title>
|
|
|
|
<Text>Hi, I am Fela.</Text>
|
|
|
|
</Container>
|
2018-03-06 13:27:47 +00:00
|
|
|
</FelaProvider>
|
|
|
|
)
|