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-change-highlight

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-change-highlight - npm Package Compare versions

Comparing version

to
1.0.2

18

build/index.js

@@ -51,3 +51,3 @@ 'use strict';

var highlightClassName = 'react-highlight';
var styles = "\n .".concat(highlightClassName, " {\n background: #f8ffb4;\n transition: 0.5s ease-in-out;\n }\n");
var styles = "\n .".concat(highlightClassName, " {\n background: #f8ffb4;\n transition: all 0.5s ease-in-out;\n }\n\n .fadeBg {\n background: transperant;\n }\n");
var styleSheet = document.createElement("style");

@@ -61,5 +61,5 @@ styleSheet.type = "text/css";

_ref$showAfter = _ref.showAfter,
showAfter = _ref$showAfter === void 0 ? 100 : _ref$showAfter,
showAfter = _ref$showAfter === void 0 ? 500 : _ref$showAfter,
_ref$hideAfter = _ref.hideAfter,
hideAfter = _ref$hideAfter === void 0 ? 1000 : _ref$hideAfter,
hideAfter = _ref$hideAfter === void 0 ? 2500 : _ref$hideAfter,
_ref$containerClassNa = _ref.containerClassName,

@@ -80,4 +80,4 @@ containerClassName = _ref$containerClassNa === void 0 ? '' : _ref$containerClassNa,

var showHighlight = function showHighlight(element) {
var showAfter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
var hideAfter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1000;
var showAfter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
var hideAfter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 2500;
setTimeout(function () {

@@ -88,4 +88,8 @@ if (!element.ref.current.className.includes(highlightStyle)) {

setTimeout(function () {
element.ref.current.className = classNames.substr(0, classNames.indexOf(highlightStyle)).trim();
}, hideAfter);
element.ref.current.className += ' fadeBg';
}, 500);
setTimeout(function () {
element.ref.current.className += ' ' + highlightStyle;
element.ref.current.className = classNames.substr(0, classNames.indexOf(highlightStyle + ' fadeBg')).trim();
}, hideAfter + 500);
}

@@ -92,0 +96,0 @@ }, showAfter);

@@ -11,3 +11,3 @@ {

],
"version": "1.0.1",
"version": "1.0.2",
"peerDependencies": {

@@ -14,0 +14,0 @@ "react": "^16.10.1",