@hoddy-ui/core 1.0.29 → 1.0.31
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
|
@@ -12,9 +12,7 @@ import { MaterialIcons } from "@expo/vector-icons";
|
|
|
12
12
|
import { FlashMessageProps } from "../types";
|
|
13
13
|
import Typography from "./Typography";
|
|
14
14
|
|
|
15
|
-
export let showFlashMessage: (msg: FlashMessageProps) => void = () => {
|
|
16
|
-
console.log("hi");
|
|
17
|
-
};
|
|
15
|
+
export let showFlashMessage: (msg: FlashMessageProps) => void = () => {};
|
|
18
16
|
|
|
19
17
|
const FlashMessage: React.FC = () => {
|
|
20
18
|
const { top } = useSafeAreaInsets();
|
|
@@ -34,7 +32,7 @@ const FlashMessage: React.FC = () => {
|
|
|
34
32
|
setTimeout(() => {
|
|
35
33
|
setMessage(null);
|
|
36
34
|
}, 500);
|
|
37
|
-
}, msg.duration ||
|
|
35
|
+
}, msg.duration || 3000);
|
|
38
36
|
};
|
|
39
37
|
useEffect(() => {
|
|
40
38
|
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
@@ -84,7 +82,7 @@ const FlashMessage: React.FC = () => {
|
|
|
84
82
|
</View>
|
|
85
83
|
|
|
86
84
|
{message?.actions?.map((cur) => (
|
|
87
|
-
<TouchableOpacity style={styles.action}>
|
|
85
|
+
<TouchableOpacity style={styles.action} onPress={cur.onPress}>
|
|
88
86
|
<Typography fontWeight={700} style={{ color: "#fff" }}>
|
|
89
87
|
{cur.title}
|
|
90
88
|
</Typography>
|
|
@@ -9,19 +9,21 @@ import { ScaledSheet } from "react-native-size-matters";
|
|
|
9
9
|
import { useColors } from "../hooks";
|
|
10
10
|
import { LocatorProps } from "../types";
|
|
11
11
|
|
|
12
|
-
// import { GOOGLE_MAP_API } from "../../api/config";
|
|
13
12
|
import { getApiKey } from "../config/KeyManager";
|
|
14
13
|
import Typography from "./Typography";
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (GOOGLE_MAP_API_KEY) Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
|
|
15
|
+
setTimeout(() => {
|
|
16
|
+
const { GOOGLE_MAP_API_KEY } = getApiKey();
|
|
17
|
+
if (GOOGLE_MAP_API_KEY) Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
|
|
18
|
+
}, 500);
|
|
19
19
|
|
|
20
20
|
type predictionType = {
|
|
21
21
|
id: string;
|
|
22
22
|
description: string;
|
|
23
23
|
};
|
|
24
24
|
export const getPredictionsFromCoords = async (coords: any) => {
|
|
25
|
+
const { GOOGLE_MAP_API_KEY } = getApiKey();
|
|
26
|
+
|
|
25
27
|
if (!GOOGLE_MAP_API_KEY)
|
|
26
28
|
console.error(
|
|
27
29
|
"Google map api key needs to be set to use this component \nMake sure to run initialize() with a valid google map api key"
|
|
@@ -61,6 +63,8 @@ export const Locator: React.FC<LocatorProps> = ({
|
|
|
61
63
|
float = true,
|
|
62
64
|
country = "ng",
|
|
63
65
|
}) => {
|
|
66
|
+
const { GOOGLE_MAP_API_KEY } = getApiKey();
|
|
67
|
+
|
|
64
68
|
const [changed, setChanged] = useState(false);
|
|
65
69
|
const [value, setValue] = useState("");
|
|
66
70
|
const [prediction, setPrediction] = useState<predictionType[]>([]);
|
|
@@ -78,7 +82,7 @@ export const Locator: React.FC<LocatorProps> = ({
|
|
|
78
82
|
borderRadius: 10,
|
|
79
83
|
marginBottom: 10,
|
|
80
84
|
width: "100%",
|
|
81
|
-
zIndex:
|
|
85
|
+
zIndex: 20,
|
|
82
86
|
marginTop: float ? 2 : "15@ms",
|
|
83
87
|
top: float ? "100%" : undefined,
|
|
84
88
|
position: float ? "absolute" : "relative",
|
|
@@ -158,7 +162,7 @@ export const Locator: React.FC<LocatorProps> = ({
|
|
|
158
162
|
}, [GOOGLE_MAP_API_KEY]);
|
|
159
163
|
|
|
160
164
|
return (
|
|
161
|
-
<View style={{ zIndex:
|
|
165
|
+
<View style={{ zIndex: 10 }}>
|
|
162
166
|
{renderInput ? (
|
|
163
167
|
renderInput({
|
|
164
168
|
onFocus: () => search(value),
|