UNPKG

react-map-gl

Version:

React components for MapLibre GL JS and Mapbox GL JS

15 lines 596 B
import { useEffect, memo } from 'react'; import { applyReactStyle } from "../utils/apply-react-style.js"; import { useControl } from "./use-control.js"; function _AttributionControl(props) { const ctrl = useControl(({ mapLib }) => new mapLib.AttributionControl(props), { position: props.position }); useEffect(() => { // @ts-expect-error accessing private member applyReactStyle(ctrl._container, props.style); }, [props.style]); return null; } export const AttributionControl = memo(_AttributionControl); //# sourceMappingURL=attribution-control.js.map