react-highlight-words
Advanced tools
Comparing version 0.15.1 to 0.16.0
@@ -79,2 +79,5 @@ module.exports = | ||
}); | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
exports['default'] = Highlighter; | ||
@@ -84,2 +87,4 @@ | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
var _highlightWordsCore = __webpack_require__(3); | ||
@@ -143,2 +148,4 @@ | ||
var rest = _objectWithoutProperties(_ref, ['activeClassName', 'activeIndex', 'activeStyle', 'autoEscape', 'caseSensitive', 'className', 'findChunks', 'highlightClassName', 'highlightStyle', 'highlightTag', 'sanitize', 'searchWords', 'textToHighlight', 'unhighlightClassName', 'unhighlightStyle']); | ||
var chunks = (0, _highlightWordsCore.findAll)({ | ||
@@ -166,4 +173,5 @@ autoEscape: autoEscape, | ||
return (0, _react.createElement)('span', { | ||
className: className, | ||
return (0, _react.createElement)('span', _extends({ | ||
className: className | ||
}, rest, { | ||
children: chunks.map(function (chunk, index) { | ||
@@ -215,3 +223,3 @@ var text = textToHighlight.substr(chunk.start, chunk.end - chunk.start); | ||
}) | ||
}); | ||
})); | ||
} | ||
@@ -218,0 +226,0 @@ |
@@ -88,2 +88,5 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
}); | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
exports['default'] = Highlighter; | ||
@@ -93,2 +96,4 @@ | ||
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; } | ||
var _highlightWordsCore = __webpack_require__(3); | ||
@@ -152,2 +157,4 @@ | ||
var rest = _objectWithoutProperties(_ref, ['activeClassName', 'activeIndex', 'activeStyle', 'autoEscape', 'caseSensitive', 'className', 'findChunks', 'highlightClassName', 'highlightStyle', 'highlightTag', 'sanitize', 'searchWords', 'textToHighlight', 'unhighlightClassName', 'unhighlightStyle']); | ||
var chunks = (0, _highlightWordsCore.findAll)({ | ||
@@ -175,4 +182,5 @@ autoEscape: autoEscape, | ||
return (0, _react.createElement)('span', { | ||
className: className, | ||
return (0, _react.createElement)('span', _extends({ | ||
className: className | ||
}, rest, { | ||
children: chunks.map(function (chunk, index) { | ||
@@ -224,3 +232,3 @@ var text = textToHighlight.substr(chunk.start, chunk.end - chunk.start); | ||
}) | ||
}); | ||
})); | ||
} | ||
@@ -227,0 +235,0 @@ |
{ | ||
"name": "react-highlight-words", | ||
"version": "0.15.1", | ||
"version": "0.16.0", | ||
"description": "React component to highlight words within a larger body of text", | ||
@@ -5,0 +5,0 @@ "main": "dist/main.js", |
@@ -52,2 +52,3 @@ <img src="https://cloud.githubusercontent.com/assets/29597/11913937/0d2dcd78-a629-11e5-83e7-6a17b6d765a5.png" width="260" height="260"> | ||
| unhighlightStyle | Object | | Inline styles applied to unhighlighted text | | ||
| * | any | | Any other props (such as `title` or `data-*`) are applied to the outer/wrapper `<span>` | | ||
@@ -54,0 +55,0 @@ ## Custom highlight tag |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2923430
3880
81