@hoddy-ui/core 2.5.7 → 2.5.8
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/next/dist/index.js +43 -29
- package/next/dist/index.js.map +1 -1
- package/next/dist/index.mjs +59 -45
- package/next/dist/index.mjs.map +1 -1
- package/next/package.json +1 -1
- package/package.json +1 -1
- package/src/Components/Popup.tsx +5 -2
package/next/package.json
CHANGED
package/package.json
CHANGED
package/src/Components/Popup.tsx
CHANGED
|
@@ -17,12 +17,13 @@ import Animated, {
|
|
|
17
17
|
useSharedValue,
|
|
18
18
|
withTiming,
|
|
19
19
|
} from "react-native-reanimated";
|
|
20
|
-
import { ScaledSheet } from "react-native-size-matters";
|
|
20
|
+
import { ms, ScaledSheet } from "react-native-size-matters";
|
|
21
21
|
import { useColors, useTheme } from "../hooks";
|
|
22
22
|
import { UIThemeProvider } from "../theme";
|
|
23
23
|
import { PopupProps } from "../types";
|
|
24
24
|
import { IconButton } from "./Button";
|
|
25
25
|
import Typography from "./Typography";
|
|
26
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
26
27
|
|
|
27
28
|
export const Popup: React.FC<PopupProps> = ({
|
|
28
29
|
title,
|
|
@@ -39,6 +40,7 @@ export const Popup: React.FC<PopupProps> = ({
|
|
|
39
40
|
const theme = useTheme();
|
|
40
41
|
const colors = useColors();
|
|
41
42
|
const [modalVisible, setModalVisible] = useState(false);
|
|
43
|
+
const { bottom } = useSafeAreaInsets();
|
|
42
44
|
|
|
43
45
|
// Animation values
|
|
44
46
|
const backdropOpacity = useSharedValue(0);
|
|
@@ -94,13 +96,14 @@ export const Popup: React.FC<PopupProps> = ({
|
|
|
94
96
|
width: sheet ? "100%" : undefined,
|
|
95
97
|
},
|
|
96
98
|
container: {
|
|
97
|
-
paddingBottom: sheet ?
|
|
99
|
+
paddingBottom: sheet && !bare ? bottom + ms(10) : undefined,
|
|
98
100
|
backgroundColor: theme === "dark" ? "#111" : colors.white[1],
|
|
99
101
|
borderTopLeftRadius: 20,
|
|
100
102
|
borderTopRightRadius: 20,
|
|
101
103
|
borderBottomRightRadius: sheet ? 0 : 20,
|
|
102
104
|
borderBottomLeftRadius: sheet ? 0 : 20,
|
|
103
105
|
width: "100%",
|
|
106
|
+
overflow: "hidden",
|
|
104
107
|
...style,
|
|
105
108
|
},
|
|
106
109
|
content: {
|