File tree Expand file tree Collapse file tree 1 file changed +12
-19
lines changed Expand file tree Collapse file tree 1 file changed +12
-19
lines changed Original file line number Diff line number Diff line change 1
1
import Qs from 'qs' ;
2
2
import React , { Component } from 'react' ;
3
- import { StyleSheet , View , ActivityIndicator } from 'react-native' ;
3
+ import { StyleSheet , View , ActivityIndicator , createElement } from 'react-native' ;
4
4
5
5
export default class extends Component {
6
6
static defaultProps = {
@@ -98,24 +98,17 @@ export default class extends Component {
98
98
}
99
99
100
100
const { title, source, onLoad, scrollEnabled } = this . props ;
101
- return (
102
- < iframe
103
- title = { title }
104
- src = { ! source . method ? source . uri : undefined }
105
- srcDoc = { this . state . html || source . html }
106
- style = { {
107
- width : '100%' ,
108
- height : '100%' ,
109
- border : 0 ,
110
- overflow : ! scrollEnabled ? 'hidden' : undefined ,
111
- } }
112
- allowFullScreen
113
- allowpaymentrequest = "true"
114
- frameBorder = "0"
115
- seamless
116
- onLoad = { onLoad }
117
- />
118
- ) ;
101
+ return createElement ( 'iframe' , {
102
+ title,
103
+ src : ! source . method ? source . uri : undefined ,
104
+ srcDoc : this . state . html || source . html ,
105
+ style : [ styles . iframe , scrollEnabled && styles . noScroll ] ,
106
+ allowFullScreen : true ,
107
+ allowpaymentrequest : 'true' ,
108
+ frameBorder : '0' ,
109
+ seamless : true ,
110
+ onLoad,
111
+ } ) ;
119
112
}
120
113
}
121
114
You can’t perform that action at this time.
0 commit comments