From faf91c820b1895c1c18bab0ba560292daaebbc9e Mon Sep 17 00:00:00 2001 From: Diego Muracciole Date: Tue, 13 Jun 2017 02:02:07 -0300 Subject: [PATCH] Fix README --- README.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 61ec78817..c7daf948f 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,19 @@ import React from 'react'; import { Page, Text, View, Document, StyleSheet } from '@react-pdf/core'; +// Create styles +const styles = StyleSheet.create({ + page: { + flexDirection: 'row', + backgroundColor: '#E4E4E4' + }, + section: { + margin: 10, + padding: 10, + flexGrow: 1 + } +}); + // Create Document Component const MyDocument = () => ( @@ -28,18 +41,6 @@ const MyDocument = () => ( ); - -const styles = StyleSheet.create({ - page: { - flexDirection: 'row', - backgroundColor: '#E4E4E4' - }, - section: { - margin: 10, - padding: 10, - flexGrow: 1 - } -}); ``` ### Render in DOM