summaryrefslogtreecommitdiff
path: root/node_modules/pigeon-maps/src/overlays/Overlay.tsx
diff options
context:
space:
mode:
authorAlexander Neonxp Kiryukhin <i@neonxp.ru>2024-08-18 13:29:54 +0300
committerAlexander Neonxp Kiryukhin <i@neonxp.ru>2024-08-18 13:29:54 +0300
commitfd70f95224374d23157ee7c0357733102cd0df53 (patch)
treee490c12e021cedaf211b292d5d623baa32a673fc /node_modules/pigeon-maps/src/overlays/Overlay.tsx
initialHEADmaster
Diffstat (limited to 'node_modules/pigeon-maps/src/overlays/Overlay.tsx')
-rw-r--r--node_modules/pigeon-maps/src/overlays/Overlay.tsx23
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>
+ )
+}