()
| 601 | } |
| 602 | |
| 603 | function _renderAlert() { |
| 604 | if (children) { |
| 605 | return children; |
| 606 | } |
| 607 | let additionalAlertViewStyle: ViewStyle = { |
| 608 | backgroundColor: _getBackgroundColorForType(alertData.type), |
| 609 | }; |
| 610 | if (isAndroid && translucent) { |
| 611 | additionalAlertViewStyle.marginTop = StatusBar.currentHeight; |
| 612 | } |
| 613 | let SafeView = SafeAreaView; |
| 614 | if (isBelowIOS11 || isAndroid) { |
| 615 | SafeView = View; |
| 616 | } |
| 617 | return ( |
| 618 | <TouchableOpacity |
| 619 | testID={DropDownAlertTestID.Alert} |
| 620 | style={[alertViewStyle, additionalAlertViewStyle]} |
| 621 | activeOpacity={activeOpacity} |
| 622 | onPress={onPress} |
| 623 | disabled={onDismissPressDisabled} |
| 624 | {...alertTouchableOpacityProps}> |
| 625 | <SafeView |
| 626 | testID={DropDownAlertTestID.SafeView} |
| 627 | style={safeViewStyle} |
| 628 | {...safeViewProps}> |
| 629 | {_renderImage(alertData.source)} |
| 630 | <View |
| 631 | testID={DropDownAlertTestID.TextView} |
| 632 | style={textViewStyle} |
| 633 | {...textViewProps}> |
| 634 | {_renderTitle(alertData.title)} |
| 635 | {_renderMessage(alertData.message)} |
| 636 | </View> |
| 637 | {showCancel && _renderCancel()} |
| 638 | </SafeView> |
| 639 | </TouchableOpacity> |
| 640 | ); |
| 641 | } |
| 642 | |
| 643 | return ( |
| 644 | <Animated.View |
no test coverage detected
searching dependent graphs…