@hoddy-ui/core 1.0.68 → 1.0.70
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
|
@@ -145,11 +145,15 @@ export const Locator: React.FC<LocatorProps> = ({
|
|
|
145
145
|
`https://maps.googleapis.com/maps/api/place/details/json?place_id=${loc.id}&fields=formatted_address%2Cgeometry&key=${GOOGLE_MAP_API_KEY}`
|
|
146
146
|
)
|
|
147
147
|
).json();
|
|
148
|
-
onLocationSelected(
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
148
|
+
onLocationSelected(
|
|
149
|
+
{
|
|
150
|
+
latitude: res.result?.geometry.location.lat,
|
|
151
|
+
longitude: res.result?.geometry.location.lng,
|
|
152
|
+
|
|
153
|
+
description: loc.description,
|
|
154
|
+
},
|
|
155
|
+
res.result?.formatted_address
|
|
156
|
+
);
|
|
153
157
|
setChanged(false);
|
|
154
158
|
setPrediction([]);
|
|
155
159
|
};
|
|
@@ -12,6 +12,7 @@ const Typography: React.FC<TypographyProps> = ({
|
|
|
12
12
|
variant = "body1",
|
|
13
13
|
align = "left",
|
|
14
14
|
gutterBottom = 0,
|
|
15
|
+
numberOfLines,
|
|
15
16
|
fontWeight = 400,
|
|
16
17
|
}) => {
|
|
17
18
|
const colors = useColors();
|
|
@@ -38,7 +39,11 @@ const Typography: React.FC<TypographyProps> = ({
|
|
|
38
39
|
},
|
|
39
40
|
});
|
|
40
41
|
return (
|
|
41
|
-
<Text
|
|
42
|
+
<Text
|
|
43
|
+
numberOfLines={numberOfLines}
|
|
44
|
+
adjustsFontSizeToFit
|
|
45
|
+
style={{ ...styles.text, ...style }}
|
|
46
|
+
>
|
|
42
47
|
{children}
|
|
43
48
|
</Text>
|
|
44
49
|
);
|
package/src/types.ts
CHANGED
|
@@ -154,7 +154,10 @@ export type LocatorInputProps = {
|
|
|
154
154
|
};
|
|
155
155
|
export interface LocatorProps {
|
|
156
156
|
variant?: "contained" | "outlined";
|
|
157
|
-
onLocationSelected: (
|
|
157
|
+
onLocationSelected: (
|
|
158
|
+
location: locatorLocation | null,
|
|
159
|
+
formatted_address?: string
|
|
160
|
+
) => void;
|
|
158
161
|
label?: string;
|
|
159
162
|
error?: string;
|
|
160
163
|
float?: boolean;
|
|
@@ -265,6 +268,7 @@ export interface TypographyProps {
|
|
|
265
268
|
| "h1";
|
|
266
269
|
align?: "center" | "left" | "right";
|
|
267
270
|
gutterBottom?: number;
|
|
271
|
+
numberOfLines?: number;
|
|
268
272
|
fontWeight?: 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
|
|
269
273
|
}
|
|
270
274
|
|