MCPcopy
hub / github.com/testshallpass/react-native-dropdownalert / _renderAlert

Function _renderAlert

DropdownAlert.tsx:603–641  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers 1

DropdownAlertFunction · 0.85

Calls 5

_renderImageFunction · 0.85
_renderTitleFunction · 0.85
_renderMessageFunction · 0.85
_renderCancelFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…