Skip to content

Commit

Permalink
fix syntax of example in README.md (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtara1 authored and christopherdro committed Jul 11, 2018
1 parent c5ccad8 commit c8bb3b3
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ import {
Text,
TouchableHighlight,
View,
} = from 'react-native';
} from 'react-native';

import RNHTMLtoPDF from 'react-native-html-to-pdf';

class Example extends Component {
export default class Example extends Component {
async createPDF() {
let options = {
html: '<h1>PDF TEST</h1>',
Expand All @@ -69,15 +69,18 @@ class Example extends Component {
};

let file = await RNHTMLtoPDF.convert(options)
console.log(file.filePath);
},
// console.log(file.filePath);
alert(file.filePath);
}

render() {
<View>
<TouchableHighlight onPress={this.createPDF}>
<Text>Create PDF</Text>
</TouchableHighlight>
</View>
return(
<View>
<TouchableHighlight onPress={this.createPDF}>
<Text>Create PDF</Text>
</TouchableHighlight>
</View>
)
}
}
```
Expand Down

0 comments on commit c8bb3b3

Please sign in to comment.