Skip to content

Commit

Permalink
Replace styles prop with style
Browse files Browse the repository at this point in the history
View doesn't have a `styles` prop, only `style`
  • Loading branch information
koenpunt committed Mar 20, 2017
1 parent edc30cd commit 1cad690
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions HTMLView.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ class HtmlView extends Component {

render() {
if (this.state.element) {
return <View children={this.state.element} styles={this.props.styles} />;
return <View children={this.state.element} style={this.props.style} />;
}
return <View styles={this.props.styles} />;
return <View style={this.props.style} />;
}
}

HtmlView.propTypes = {
value: PropTypes.string,
stylesheet: PropTypes.object,
styles: PropTypes.object,
style: View.propTypes.style,
onLinkPress: PropTypes.func,
onError: PropTypes.func,
renderNode: PropTypes.func,
Expand Down
12 changes: 6 additions & 6 deletions __tests__/__snapshots__/HTMLView-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`<HTMLView/> can use a custom renderer 1`] = `
<View
styles={undefined}
style={undefined}
>
<Text
accessible={true}
Expand Down Expand Up @@ -48,7 +48,7 @@ exports[`<HTMLView/> can use a custom renderer 1`] = `

exports[`<HTMLView/> should render an <Image /> with set width/height 1`] = `
<View
styles={undefined}
style={undefined}
>
<Image
source={
Expand All @@ -71,7 +71,7 @@ exports[`<HTMLView/> should render an <Image /> with set width/height 1`] = `

exports[`<HTMLView/> should render an <Image />, with default width/height of 1 1`] = `
<View
styles={undefined}
style={undefined}
>
<Image
source={
Expand All @@ -94,7 +94,7 @@ exports[`<HTMLView/> should render an <Image />, with default width/height of 1

exports[`<HTMLView/> should render an empty <Text/> element 1`] = `
<View
styles={undefined}
style={undefined}
>
<Text
accessible={true}
Expand Down Expand Up @@ -128,7 +128,7 @@ exports[`<HTMLView/> should render an empty <Text/> element 1`] = `

exports[`<HTMLView/> should render shoddy html including headings, links, bold, italic 1`] = `
<View
styles={undefined}
style={undefined}
>
<Text
accessible={true}
Expand Down Expand Up @@ -351,7 +351,7 @@ exports[`<HTMLView/> should render shoddy html including headings, links, bold,

exports[`<HTMLView/> should render text in a (nested) <Text/> element 1`] = `
<View
styles={undefined}
style={undefined}
>
<Text
accessible={true}
Expand Down
2 changes: 1 addition & 1 deletion example/__tests__/__snapshots__/Example-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`<Example/> should render 1`] = `
>
<View>
<View
styles={undefined}
style={undefined}
>
<Text
accessible={true}
Expand Down

0 comments on commit 1cad690

Please sign in to comment.