Skip to content

Commit 1f0f5ad

Browse files
Merge pull request #49 from testshallpass/flatten-prop-styles-#45-fix
Flatten prop styles;
2 parents 6f55ac1 + 62ab8a1 commit 1f0f5ad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

DropdownAlert.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ export default class DropdownAlert extends Component {
356356
}
357357
renderDropDown(isOpen) {
358358
if (isOpen == true) {
359-
var style = [styles.defaultContainer, this.props.containerStyle]
359+
var style = [styles.defaultContainer, StyleSheet.flatten(this.props.containerStyle)]
360360
var source = this.props.imageSrc
361361
var backgroundColor = this.props.containerStyle.backgroundColor
362362
switch (this.state.type) {
@@ -409,12 +409,12 @@ export default class DropdownAlert extends Component {
409409
disabled={!this.props.tapToCloseEnabled}
410410
onLayout={(event) => this.onLayoutEvent(event)}>
411411
<View style={style}>
412-
{this.renderImage(source, this.props.imageStyle)}
412+
{this.renderImage(source, StyleSheet.flatten(this.props.imageStyle))}
413413
<View style={styles.textContainer}>
414-
{this.renderText(this.state.title, this.props.titleStyle, this.props.titleNumOfLines)}
415-
{this.renderText(this.state.message, this.props.messageStyle, this.props.messageNumOfLines)}
414+
{this.renderText(this.state.title, StyleSheet.flatten(this.props.titleStyle), this.props.titleNumOfLines)}
415+
{this.renderText(this.state.message, StyleSheet.flatten(this.props.messageStyle), this.props.messageNumOfLines)}
416416
</View>
417-
{this.renderButton(this.props.cancelBtnImageSrc, this.props.cancelBtnImageStyle, this.onCancel, backgroundColor, this.props.showCancel)}
417+
{this.renderButton(this.props.cancelBtnImageSrc, StyleSheet.flatten(this.props.cancelBtnImageStyle), this.onCancel, backgroundColor, this.props.showCancel)}
418418
</View>
419419
</TouchableHighlight>
420420
</Animated.View>

0 commit comments

Comments
 (0)