Files
mmm-projet/components/theme/themed-mapview.tsx
2025-12-11 21:24:28 +01:00

23 lines
536 B
TypeScript

import MapView, { Marker, PROVIDER_DEFAULT, type MapViewProps } from 'react-native-maps';
import { useThemeColor, useThemeColorMap } from '@/hooks/use-theme-color';
export type ThemedMapViewProps = MapViewProps & {
lightColor?: string;
darkColor?: string;
};
export function ThemedMapView({children, style, lightColor, darkColor, ...otherProps }: ThemedMapViewProps) {
const mapeStyle = useThemeColorMap();
return<MapView customMapStyle={mapeStyle} style={style} {...otherProps}>
{children}
</MapView>;
}