@hoddy-ui/core 1.0.83 → 1.0.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Components/Popup.tsx +43 -41
package/package.json
CHANGED
package/src/Components/Popup.tsx
CHANGED
|
@@ -15,6 +15,7 @@ import { useColors } from "../hooks";
|
|
|
15
15
|
import { PopupProps } from "../types";
|
|
16
16
|
import { IconButton } from "./Button";
|
|
17
17
|
import Typography from "./Typography";
|
|
18
|
+
import { UIThemeProvider } from "../theme";
|
|
18
19
|
|
|
19
20
|
export const Popup: React.FC<PopupProps> = ({
|
|
20
21
|
title,
|
|
@@ -95,50 +96,51 @@ export const Popup: React.FC<PopupProps> = ({
|
|
|
95
96
|
onRequestClose={closeAction}
|
|
96
97
|
>
|
|
97
98
|
<View style={styles.backdrop} />
|
|
99
|
+
<UIThemeProvider>
|
|
100
|
+
<Modal
|
|
101
|
+
transparent
|
|
102
|
+
animationType="slide"
|
|
103
|
+
statusBarTranslucent
|
|
104
|
+
visible={showSecondary}
|
|
105
|
+
onRequestClose={closeAction}
|
|
106
|
+
>
|
|
107
|
+
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
|
|
108
|
+
<View style={styles.root}>
|
|
109
|
+
{open && (
|
|
110
|
+
<Pressable
|
|
111
|
+
style={StyleSheet.absoluteFill}
|
|
112
|
+
onPress={closeAction}
|
|
113
|
+
/>
|
|
114
|
+
)}
|
|
98
115
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
keyboardVerticalOffset={keyboardVerticalOffset}
|
|
118
|
-
behavior={Platform.OS === "ios" ? "position" : "padding"}
|
|
119
|
-
>
|
|
120
|
-
<View style={styles.container}>
|
|
121
|
-
{!bare && (
|
|
122
|
-
<View style={styles.title}>
|
|
123
|
-
<IconButton
|
|
124
|
-
size={20}
|
|
125
|
-
icon="close"
|
|
126
|
-
onPress={closeAction}
|
|
127
|
-
/>
|
|
128
|
-
<View style={{ flex: 1 }}>
|
|
129
|
-
<Typography color="textSecondary" align="center">
|
|
130
|
-
{title}
|
|
131
|
-
</Typography>
|
|
116
|
+
<KeyboardAvoidingView
|
|
117
|
+
style={styles.avoidingView}
|
|
118
|
+
keyboardVerticalOffset={keyboardVerticalOffset}
|
|
119
|
+
behavior={Platform.OS === "ios" ? "position" : "padding"}
|
|
120
|
+
>
|
|
121
|
+
<View style={styles.container}>
|
|
122
|
+
{!bare && (
|
|
123
|
+
<View style={styles.title}>
|
|
124
|
+
<IconButton
|
|
125
|
+
size={20}
|
|
126
|
+
icon="close"
|
|
127
|
+
onPress={closeAction}
|
|
128
|
+
/>
|
|
129
|
+
<View style={{ flex: 1 }}>
|
|
130
|
+
<Typography color="textSecondary" align="center">
|
|
131
|
+
{title}
|
|
132
|
+
</Typography>
|
|
133
|
+
</View>
|
|
132
134
|
</View>
|
|
133
|
-
|
|
134
|
-
)}
|
|
135
|
+
)}
|
|
135
136
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
137
|
+
<View style={styles.content}>{children}</View>
|
|
138
|
+
</View>
|
|
139
|
+
</KeyboardAvoidingView>
|
|
140
|
+
</View>
|
|
141
|
+
</TouchableWithoutFeedback>
|
|
142
|
+
</Modal>
|
|
143
|
+
</UIThemeProvider>
|
|
142
144
|
</Modal>
|
|
143
145
|
</>
|
|
144
146
|
);
|