@hoddy-ui/core 1.0.51 → 1.0.52

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hoddy-ui/core",
3
- "version": "1.0.51",
3
+ "version": "1.0.52",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -23,12 +23,14 @@ export const Popup: React.FC<PopupProps> = ({
23
23
  }) => {
24
24
  const colors = useColors();
25
25
  const [show, setShow] = useState(open);
26
+ const [showSecondary, setShowSecondary] = useState(false);
26
27
 
27
28
  const styles: any = ScaledSheet.create({
28
29
  avoidingView: {
29
30
  marginTop: sheet ? "auto" : "50%",
30
31
  minHeight: typeof sheet === "number" ? sheet : undefined,
31
32
  maxHeight: "80%",
33
+ zIndex: 1000,
32
34
  alignSelf: "center",
33
35
  maxWidth: sheet ? undefined : "90%",
34
36
  width: sheet ? "100%" : undefined,
@@ -56,14 +58,17 @@ export const Popup: React.FC<PopupProps> = ({
56
58
  backdrop: {
57
59
  position: "absolute",
58
60
  height: "100%",
61
+ zIndex: -1,
59
62
  width: "100%",
60
- zIndex: 10000,
61
63
  backgroundColor: "#000b",
62
64
  },
63
65
  });
64
66
 
65
67
  React.useEffect(() => {
66
68
  setShow(open);
69
+ setTimeout(() => {
70
+ setShowSecondary(open);
71
+ }, 500);
67
72
  }, [open]);
68
73
 
69
74
  const closeAction = () => {
@@ -79,11 +84,12 @@ export const Popup: React.FC<PopupProps> = ({
79
84
  visible={show}
80
85
  onRequestClose={() => setShow(false)}
81
86
  >
82
- <Pressable style={styles.backdrop} />
87
+ <View style={styles.backdrop} />
88
+
83
89
  <Modal
84
90
  transparent
85
91
  animationType="slide"
86
- visible={show}
92
+ visible={showSecondary}
87
93
  onRequestClose={() => setShow(false)}
88
94
  >
89
95
  {open && (