Skip to content

Commit 851b1f5

Browse files
committed
Fix iframe's style
1 parent f92540b commit 851b1f5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import React, { Component } from 'react';
33
import { StyleSheet, View, ActivityIndicator } from 'react-native';
44

55
export default class extends Component {
6+
static defaultProps = {
7+
scrollEnabled: true,
8+
};
9+
610
state = { html: null };
711

812
constructor(props) {
@@ -99,7 +103,12 @@ export default class extends Component {
99103
title={title}
100104
src={!source.method ? source.uri : undefined}
101105
srcDoc={this.state.html || source.html}
102-
style={[styles.iframe, !scrollEnabled && styles.noScroll]}
106+
style={{
107+
width: '100%',
108+
height: '100%',
109+
border: 0,
110+
overflow: !scrollEnabled ? 'hidden' : undefined,
111+
}}
103112
allowFullScreen
104113
allowpaymentrequest="true"
105114
frameBorder="0"

0 commit comments

Comments
 (0)