react-highlight-words
Advanced tools
Comparing version 0.4.1 to 0.5.0
@@ -92,2 +92,3 @@ module.exports = | ||
highlightClassName: _react.PropTypes.string, | ||
highlightTag: _react.PropTypes.string, | ||
highlightStyle: _react.PropTypes.object, | ||
@@ -110,2 +111,4 @@ searchWords: _react.PropTypes.arrayOf(_react.PropTypes.string).isRequired, | ||
var highlightStyle = _ref$highlightStyle === undefined ? {} : _ref$highlightStyle; | ||
var _ref$highlightTag = _ref.highlightTag; | ||
var highlightTag = _ref$highlightTag === undefined ? 'mark' : _ref$highlightTag; | ||
var searchWords = _ref.searchWords; | ||
@@ -121,2 +124,3 @@ var textToHighlight = _ref.textToHighlight; | ||
}); | ||
var HighlightTag = highlightTag; | ||
@@ -131,3 +135,3 @@ return _react2['default'].createElement( | ||
return _react2['default'].createElement( | ||
'mark', | ||
HighlightTag, | ||
{ | ||
@@ -134,0 +138,0 @@ className: highlightClassName, |
{ | ||
"name": "react-highlight-words", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "React component to highlight words within a larger body of text", | ||
@@ -5,0 +5,0 @@ "main": "dist/main.js", |
@@ -30,2 +30,3 @@ <img src="https://cloud.githubusercontent.com/assets/29597/11913937/0d2dcd78-a629-11e5-83e7-6a17b6d765a5.png" width="260" height="260"> | ||
| highlightStyle | Object | | Inline styles applied to highlighted text | | ||
| highlightTag | String | | Type of tag to wrap around highlighted matches; defaults to `mark` | | ||
| sanitize | Function | | Process each search word and text to highlight before comparing (eg remove accents); signature `(text: string): string` | | ||
@@ -32,0 +33,0 @@ | searchWords | Array<String> | ✓ | Array of search words | |
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
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
2473630
1214
42