react-change-highlight
Advanced tools
Comparing version
@@ -51,5 +51,5 @@ 'use strict'; | ||
var highlightClassName = 'react-highlight'; | ||
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"); | ||
styleSheet.type = "text/css"; | ||
var styles = "\n .".concat(highlightClassName, " {\n background-color: #f8ffb4;\n transition: all 0.5s ease-in-out;\n }\n\n .fadeBg {\n background-color: none;\n transition: all 0.5s ease-in-out;\n }\n"); | ||
var styleSheet = document.createElement('style'); | ||
styleSheet.type = 'text/css'; | ||
styleSheet.innerText = styles; | ||
@@ -87,6 +87,6 @@ document.head.appendChild(styleSheet); | ||
element.ref.current.className += ' fadeBg'; | ||
}, 500); | ||
}, hideAfter - 500); | ||
setTimeout(function () { | ||
element.ref.current.className = classNames.substr(0, classNames.indexOf(highlightStyle + ' fadeBg')).trim(); | ||
}, hideAfter + 500); | ||
element.ref.current.className = classNames.substr(0, classNames.indexOf(highlightStyle)).trim(); | ||
}, hideAfter); | ||
} | ||
@@ -93,0 +93,0 @@ }, showAfter); |
@@ -11,3 +11,3 @@ { | ||
], | ||
"version": "1.0.3", | ||
"version": "1.0.4-0", | ||
"peerDependencies": { | ||
@@ -14,0 +14,0 @@ "react": "^16.10.1", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
5736
0.7%2
100%