Commit 2a14d322 authored by Daniel Steigerwald's avatar Daniel Steigerwald Committed by Tim Neutkens

Fix Fela example (#1663)

* Fix Fela example

Styles must be set via the innerHTML. Otherwise, a fontFamily "Segoe
UI” will have encoded quotes.

* Add example

Which didn’t work previously.

* Fix lint
parent 85342002
......@@ -20,7 +20,10 @@ export default class MyDocument extends Document {
<html>
<Head>
<title>My page</title>
<style id='fela-stylesheet'>{this.props.css}</style>
<style
dangerouslySetInnerHTML={{ __html: this.props.css }}
id='fela-stylesheet'
/>
</Head>
<body>
<Main />
......
......@@ -2,6 +2,7 @@ import { createComponent } from 'react-fela'
import Page from '../layout'
const title = ({ size }) => ({
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
fontSize: size + 'px',
color: 'red'
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment