stripe embedded and other fixes
This commit is contained in:
+19
-1
@@ -27,6 +27,21 @@ const WebAlertModal = ({ title, description, options }) => {
|
||||
cancelOption?.onPress();
|
||||
};
|
||||
|
||||
const renderDescription = () => {
|
||||
if (
|
||||
typeof description === "string" ||
|
||||
typeof description === "number"
|
||||
) {
|
||||
return <Text style={styles.description}>{description}</Text>;
|
||||
}
|
||||
|
||||
if (!description) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <View style={styles.customDescription}>{description}</View>;
|
||||
};
|
||||
|
||||
return (
|
||||
<PortalProvider>
|
||||
<Overlay
|
||||
@@ -42,7 +57,7 @@ const WebAlertModal = ({ title, description, options }) => {
|
||||
>
|
||||
<BlurView intensity={100} tint="dark" style={styles.modalContainer}>
|
||||
<Text style={styles.title}>{title}</Text>
|
||||
<Text style={styles.description}>{description}</Text>
|
||||
{renderDescription()}
|
||||
<View style={styles.divider} />
|
||||
<View
|
||||
style={hasSecondaryAction ? styles.actionsRow : styles.actions}
|
||||
@@ -152,6 +167,9 @@ const styles = StyleSheet.create({
|
||||
backgroundColor: "rgba(255,255,255,0.08)",
|
||||
marginVertical: 0,
|
||||
},
|
||||
customDescription: {
|
||||
width: "100%",
|
||||
},
|
||||
actionsRow: {
|
||||
flexDirection: "row",
|
||||
gap: gutters,
|
||||
|
||||
Reference in New Issue
Block a user