@hoddy-ui/next 2.0.22 → 2.0.23
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/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -209,18 +209,19 @@ function colors(theme) {
|
|
|
209
209
|
var config = {
|
|
210
210
|
GOOGLE_MAP_API_KEY: ""
|
|
211
211
|
};
|
|
212
|
-
function
|
|
212
|
+
function setConfig(key) {
|
|
213
213
|
config = key;
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function getConfig() {
|
|
216
216
|
return config;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
// ../src/config/index.ts
|
|
220
220
|
function initialize(config2) {
|
|
221
221
|
try {
|
|
222
|
-
|
|
223
|
-
GOOGLE_MAP_API_KEY: config2.googleMapApiKey
|
|
222
|
+
setConfig({
|
|
223
|
+
GOOGLE_MAP_API_KEY: config2.googleMapApiKey,
|
|
224
|
+
DEFAULT_FONT_FAMILY: config2.fontFamily
|
|
224
225
|
});
|
|
225
226
|
if (config2.colors)
|
|
226
227
|
setExtraColors(config2.colors);
|
|
@@ -293,7 +294,7 @@ var Typography = (0, import_react.forwardRef)(
|
|
|
293
294
|
alignItems: "center",
|
|
294
295
|
textAlign: align,
|
|
295
296
|
fontWeight: fontWeight.toString(),
|
|
296
|
-
fontFamily: fontFamily || "System"
|
|
297
|
+
fontFamily: fontFamily || getConfig().DEFAULT_FONT_FAMILY || "System"
|
|
297
298
|
// Use custom font if provided, else default
|
|
298
299
|
}
|
|
299
300
|
});
|
|
@@ -1726,12 +1727,12 @@ var TextField_default = TextField;
|
|
|
1726
1727
|
var Location = __toESM(require("expo-location"));
|
|
1727
1728
|
var import_react_native_size_matters15 = require("react-native-size-matters");
|
|
1728
1729
|
setTimeout(() => {
|
|
1729
|
-
const { GOOGLE_MAP_API_KEY } =
|
|
1730
|
+
const { GOOGLE_MAP_API_KEY } = getConfig();
|
|
1730
1731
|
if (GOOGLE_MAP_API_KEY)
|
|
1731
1732
|
Location.setGoogleApiKey(GOOGLE_MAP_API_KEY);
|
|
1732
1733
|
}, 500);
|
|
1733
1734
|
var getPredictionsFromCoords = async (coords) => {
|
|
1734
|
-
const { GOOGLE_MAP_API_KEY } =
|
|
1735
|
+
const { GOOGLE_MAP_API_KEY } = getConfig();
|
|
1735
1736
|
if (!GOOGLE_MAP_API_KEY)
|
|
1736
1737
|
console.error(
|
|
1737
1738
|
"Google map api key needs to be set to use this component \nMake sure to run initialize() with a valid google map api key"
|
|
@@ -1766,7 +1767,7 @@ var Locator = ({
|
|
|
1766
1767
|
float = true,
|
|
1767
1768
|
country = "ng"
|
|
1768
1769
|
}) => {
|
|
1769
|
-
const { GOOGLE_MAP_API_KEY } =
|
|
1770
|
+
const { GOOGLE_MAP_API_KEY } = getConfig();
|
|
1770
1771
|
const [changed, setChanged] = (0, import_react17.useState)(false);
|
|
1771
1772
|
const [value, setValue] = (0, import_react17.useState)("");
|
|
1772
1773
|
const [prediction, setPrediction] = (0, import_react17.useState)([]);
|