@hoddy-ui/core 1.0.24 → 1.0.26

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.24",
3
+ "version": "1.0.26",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -13,15 +13,14 @@ 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
-
20
16
  type predictionType = {
21
17
  id: string;
22
18
  description: string;
23
19
  };
24
20
  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);
25
24
  if (!GOOGLE_MAP_API_KEY)
26
25
  console.error(
27
26
  "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 +60,9 @@ export const Locator: React.FC<LocatorProps> = ({
61
60
  float = true,
62
61
  country = "ng",
63
62
  }) => {
63
+ const { GOOGLE_MAP_API_KEY } = getApiKey();
64
+
65
+ if (GOOGLE_MAP_API_KEY) Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
64
66
  const [changed, setChanged] = useState(false);
65
67
  const [value, setValue] = useState("");
66
68
  const [prediction, setPrediction] = useState<predictionType[]>([]);
@@ -78,7 +80,7 @@ export const Locator: React.FC<LocatorProps> = ({
78
80
  borderRadius: 10,
79
81
  marginBottom: 10,
80
82
  width: "100%",
81
- zIndex: 1000,
83
+ zIndex: 20,
82
84
  marginTop: float ? 2 : "15@ms",
83
85
  top: float ? "100%" : undefined,
84
86
  position: float ? "absolute" : "relative",
@@ -158,7 +160,7 @@ export const Locator: React.FC<LocatorProps> = ({
158
160
  }, [GOOGLE_MAP_API_KEY]);
159
161
 
160
162
  return (
161
- <View style={{ zIndex: 100 }}>
163
+ <View style={{ zIndex: 10 }}>
162
164
  {renderInput ? (
163
165
  renderInput({
164
166
  onFocus: () => search(value),