@hoddy-ui/core 1.0.25 → 1.0.27

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.25",
3
+ "version": "1.0.27",
4
4
  "description": "Core rich react native components written in typescript",
5
5
  "main": "index.ts",
6
6
  "repository": {
@@ -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[]>([]);
package/src/types.ts CHANGED
@@ -120,7 +120,7 @@ export interface LinkButtonProps {
120
120
  style?: ViewStyle;
121
121
  color?: colorTypes;
122
122
  fontSize?: number;
123
- fontWeight: string;
123
+ fontWeight?: string;
124
124
  disabled?: boolean;
125
125
  onPress?: () => void;
126
126
  }