@hoddy-ui/core 1.0.26 → 1.0.28
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/Locator.tsx +6 -8
- package/src/types.ts +2 -2
package/package.json
CHANGED
|
@@ -13,14 +13,15 @@ import { LocatorProps } from "../types";
|
|
|
13
13
|
import { getApiKey } from "../config/KeyManager";
|
|
14
14
|
import Typography from "./Typography";
|
|
15
15
|
|
|
16
|
+
const { GOOGLE_MAP_API_KEY } = getApiKey();
|
|
17
|
+
|
|
18
|
+
if (GOOGLE_MAP_API_KEY) Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
|
|
19
|
+
|
|
16
20
|
type predictionType = {
|
|
17
21
|
id: string;
|
|
18
22
|
description: string;
|
|
19
23
|
};
|
|
20
24
|
export const getPredictionsFromCoords = async (coords: any) => {
|
|
21
|
-
const { GOOGLE_MAP_API_KEY } = getApiKey();
|
|
22
|
-
|
|
23
|
-
if (GOOGLE_MAP_API_KEY) Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
|
|
24
25
|
if (!GOOGLE_MAP_API_KEY)
|
|
25
26
|
console.error(
|
|
26
27
|
"Google map api key needs to be set to use this component \nMake sure to run initialize() with a valid google map api key"
|
|
@@ -60,9 +61,6 @@ export const Locator: React.FC<LocatorProps> = ({
|
|
|
60
61
|
float = true,
|
|
61
62
|
country = "ng",
|
|
62
63
|
}) => {
|
|
63
|
-
const { GOOGLE_MAP_API_KEY } = getApiKey();
|
|
64
|
-
|
|
65
|
-
if (GOOGLE_MAP_API_KEY) Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
|
|
66
64
|
const [changed, setChanged] = useState(false);
|
|
67
65
|
const [value, setValue] = useState("");
|
|
68
66
|
const [prediction, setPrediction] = useState<predictionType[]>([]);
|
|
@@ -80,7 +78,7 @@ export const Locator: React.FC<LocatorProps> = ({
|
|
|
80
78
|
borderRadius: 10,
|
|
81
79
|
marginBottom: 10,
|
|
82
80
|
width: "100%",
|
|
83
|
-
zIndex:
|
|
81
|
+
zIndex: 1000,
|
|
84
82
|
marginTop: float ? 2 : "15@ms",
|
|
85
83
|
top: float ? "100%" : undefined,
|
|
86
84
|
position: float ? "absolute" : "relative",
|
|
@@ -160,7 +158,7 @@ export const Locator: React.FC<LocatorProps> = ({
|
|
|
160
158
|
}, [GOOGLE_MAP_API_KEY]);
|
|
161
159
|
|
|
162
160
|
return (
|
|
163
|
-
<View style={{ zIndex:
|
|
161
|
+
<View style={{ zIndex: 100 }}>
|
|
164
162
|
{renderInput ? (
|
|
165
163
|
renderInput({
|
|
166
164
|
onFocus: () => search(value),
|
package/src/types.ts
CHANGED
|
@@ -117,10 +117,10 @@ export interface FlashMessageProps {
|
|
|
117
117
|
}
|
|
118
118
|
export interface LinkButtonProps {
|
|
119
119
|
title: string;
|
|
120
|
-
style?: ViewStyle;
|
|
120
|
+
style?: TextStyle & ViewStyle;
|
|
121
121
|
color?: colorTypes;
|
|
122
122
|
fontSize?: number;
|
|
123
|
-
fontWeight
|
|
123
|
+
fontWeight?: string;
|
|
124
124
|
disabled?: boolean;
|
|
125
125
|
onPress?: () => void;
|
|
126
126
|
}
|