Skip to content

Commit c8bb3b3

Browse files
jtara1christopherdro
authored andcommitted
fix syntax of example in README.md (#79)
1 parent c5ccad8 commit c8bb3b3

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ import {
5656
Text,
5757
TouchableHighlight,
5858
View,
59-
} = from 'react-native';
59+
} from 'react-native';
6060

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

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

7171
let file = await RNHTMLtoPDF.convert(options)
72-
console.log(file.filePath);
73-
},
72+
// console.log(file.filePath);
73+
alert(file.filePath);
74+
}
7475

7576
render() {
76-
<View>
77-
<TouchableHighlight onPress={this.createPDF}>
78-
<Text>Create PDF</Text>
79-
</TouchableHighlight>
80-
</View>
77+
return(
78+
<View>
79+
<TouchableHighlight onPress={this.createPDF}>
80+
<Text>Create PDF</Text>
81+
</TouchableHighlight>
82+
</View>
83+
)
8184
}
8285
}
8386
```

0 commit comments

Comments
 (0)