Allow overwriting imageContainer styles.

Closes #286
This commit is contained in:
Laurin Quast 2018-09-23 23:00:41 +02:00 committed by Dylan Vann
parent b18728db84
commit b8c82c7d5e
2 changed files with 8 additions and 8 deletions

View File

@ -5,11 +5,11 @@ exports[`FastImage renders correctly. 1`] = `
style={ style={
Array [ Array [
Object { Object {
"height": 44, "overflow": "hidden",
"width": 44,
}, },
Object { Object {
"overflow": "hidden", "height": 44,
"width": 44,
}, },
] ]
} }
@ -43,11 +43,11 @@ exports[`Renders a normal Image when not passed a uri. 1`] = `
style={ style={
Array [ Array [
Object { Object {
"height": 44, "overflow": "hidden",
"width": 44,
}, },
Object { Object {
"overflow": "hidden", "height": 44,
"width": 44,
}, },
] ]
} }

View File

@ -39,7 +39,7 @@ class FastImage extends Component {
if (fallback) { if (fallback) {
return ( return (
<View <View
style={[style, styles.imageContainer]} style={[styles.imageContainer, style]}
ref={this.captureRef} ref={this.captureRef}
> >
<FastImageView <FastImageView
@ -58,7 +58,7 @@ class FastImage extends Component {
} }
return ( return (
<View style={[style, styles.imageContainer]} ref={this.captureRef}> <View style={[styles.imageContainer, style]} ref={this.captureRef}>
<FastImageView <FastImageView
{...props} {...props}
style={StyleSheet.absoluteFill} style={StyleSheet.absoluteFill}