File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -56,11 +56,11 @@ import {
56
56
Text ,
57
57
TouchableHighlight ,
58
58
View ,
59
- } = from ' react-native' ;
59
+ } from ' react-native' ;
60
60
61
61
import RNHTMLtoPDF from ' react-native-html-to-pdf' ;
62
62
63
- class Example extends Component {
63
+ export default class Example extends Component {
64
64
async createPDF () {
65
65
let options = {
66
66
html: ' <h1>PDF TEST</h1>' ,
@@ -69,15 +69,18 @@ class Example extends Component {
69
69
};
70
70
71
71
let file = await RNHTMLtoPDF .convert (options)
72
- console .log (file .filePath );
73
- },
72
+ // console.log(file.filePath);
73
+ alert (file .filePath );
74
+ }
74
75
75
76
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
+ )
81
84
}
82
85
}
83
86
```
You can’t perform that action at this time.
0 commit comments