Skip to content

Commit 80633bc

Browse files
committed
Updated export of callout
1 parent dc65623 commit 80633bc

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

packages/maps/src/components/MapCallout.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ export interface MapCalloutProps
77
showTooltip?: boolean;
88
}
99

10-
const MapCallout: React.FC<React.PropsWithChildren<MapCalloutProps>> = ({
10+
// Has to be a function named 'Callout' to be matched as a Callout component and not a custom view for marker
11+
// See: https://github.com/teovillanueva/react-native-web-maps/blob/81278079c6f26a707d915d69de9a00080c305957/packages/react-native-web-maps/src/components/marker.web.tsx#L79
12+
export function Callout({
1113
showTooltip,
1214
...rest
13-
}) => {
15+
}: React.PropsWithChildren<MapCalloutProps>) {
1416
return <MapCalloutComponent tooltip={!showTooltip} {...rest} />;
15-
};
16-
17-
export default MapCallout;
17+
}

packages/maps/src/components/index.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/maps/src/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
export { MapView, MapMarker } from "./components";
2-
3-
// Has to be exported directly, otherwise can be considered a custom marker and not a callout
4-
export { Callout as MapCallout } from "./components/react-native-maps";
1+
export { default as MapView } from "./components/MapView";
2+
export { default as MapMarker } from "./components/MapMarker";
3+
export { Callout as MapCallout } from "./components/MapCallout";

0 commit comments

Comments
 (0)