UNPKG

react-bkoi-gl

Version:

React components for Barikoi GL JS

21 lines 657 B
import { useEffect, memo } from "react"; import { applyReactStyle } from "../utils/apply-react-style.js"; import { useControl } from "./use-control.js"; function _FullscreenControl(props) { const ctrl = useControl(_ref => { let { mapLib } = _ref; return new mapLib.FullscreenControl({ container: props.containerId && document.getElementById(props.containerId) }); }, { position: props.position }); useEffect(() => { applyReactStyle(ctrl._controlContainer, props.style); }, [props.style]); return null; } export const FullscreenControl = memo(_FullscreenControl); //# sourceMappingURL=fullscreen-control.js.map