diff options
Diffstat (limited to 'node_modules/pigeon-maps/src/overlays/Overlay.tsx')
-rw-r--r-- | node_modules/pigeon-maps/src/overlays/Overlay.tsx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/node_modules/pigeon-maps/src/overlays/Overlay.tsx b/node_modules/pigeon-maps/src/overlays/Overlay.tsx new file mode 100644 index 0000000..0bc8ecd --- /dev/null +++ b/node_modules/pigeon-maps/src/overlays/Overlay.tsx @@ -0,0 +1,23 @@ +import React from 'react' +import { PigeonProps } from '../types' + +interface OverlayProps extends PigeonProps { + style?: React.CSSProperties + className?: string + children?: React.ReactNode +} + +export function Overlay(props: OverlayProps) { + return ( + <div + style={{ + position: 'absolute', + transform: `translate(${props.left}px, ${props.top}px)`, + ...(props.style || {}), + }} + className={props.className ? `${props.className} pigeon-click-block` : 'pigeon-click-block'} + > + {props.children} + </div> + ) +} |