You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

react-leaflet-custom-control

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-leaflet-custom-control - npm Package Compare versions

Comparing version

to
1.3.3

17

lib/Control.js

@@ -0,1 +1,12 @@

var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
import React from 'react';

@@ -9,3 +20,4 @@ var POSITION_CLASSES = {

var Control = function (props) {
var _a = React.useState(document.createElement('div')), portalRoot = _a[0], setPortalRoot = _a[1];
var _a, _b;
var _c = React.useState(document.createElement('div')), portalRoot = _c[0], setPortalRoot = _c[1];
var positionClass = ((props.position && POSITION_CLASSES[props.position]) || POSITION_CLASSES.topright);

@@ -27,5 +39,6 @@ var controlContainerRef = React.createRef();

}, [portalRoot, props.prepend, controlContainerRef]);
return (React.createElement("div", { ref: controlContainerRef, className: 'leaflet-control' }, props.children));
var className = (((_b = (_a = props.container) === null || _a === void 0 ? void 0 : _a.className) === null || _b === void 0 ? void 0 : _b.concat(' ')) || '') + 'leaflet-control';
return (React.createElement("div", __assign({}, props.container, { ref: controlContainerRef, className: className }), props.children));
};
export default Control;
//# sourceMappingURL=Control.js.map

2

package.json
{
"name": "react-leaflet-custom-control",
"version": "1.3.2",
"version": "1.3.3",
"description": "Creates a control wrapper around a React element",

@@ -5,0 +5,0 @@ "main": "lib/Control.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet