From 0294584498c3b18a5f851806345fc28cf7accd88 Mon Sep 17 00:00:00 2001 From: NishargShah Date: Sat, 9 Jan 2021 15:58:21 +0530 Subject: [PATCH] ready for npm --- lib/styles.js | 33 +++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 lib/styles.js diff --git a/lib/styles.js b/lib/styles.js new file mode 100644 index 0000000..2201211 --- /dev/null +++ b/lib/styles.js @@ -0,0 +1,33 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +const absPos = { + position: "absolute", + top: 0, + left: 0 +}; + +const styles = props => { + return { + container: { + position: "relative" + }, + canvas: { ...absPos, + pointerEvents: "none", + zIndex: 2 + }, + img: { ...absPos, + zIndex: 1, + userSelect: "none" + }, + map: (props === null || props === void 0 ? void 0 : props.onClick) && { + cursor: "pointer" + } || undefined + }; +}; + +var _default = styles; +exports.default = _default; diff --git a/package.json b/package.json index 423c90c..254d424 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-img-mapper", - "version": "0.1.6", + "version": "0.2.0", "description": "React Component to highlight interactive zones in images", "main": "lib/ImageMapper.js", "author": "Nisharg Shah",