Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import React from 'react';
import {Text} from 'react-native';
import {findAll} from 'highlight-words-core';
import PropTypes from 'prop-types';
import { TextPropTypes } from 'deprecated-react-native-prop-types'

Highlighter.propTypes = {
autoEscape: PropTypes.bool,
highlightStyle: Text.propTypes.style,
highlightStyle: TextPropTypes ? TextPropTypes.style : Text.propTypes?.style,
searchWords: PropTypes.arrayOf(PropTypes.string).isRequired,
textToHighlight: PropTypes.string.isRequired,
sanitize: PropTypes.func,
style: Text.propTypes.style
style: TextPropTypes ? TextPropTypes.style : Text.propTypes?.style
};

/**
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-highlight-words",
"version": "1.0.1",
"version": "1.0.2",
"description": "A React Native port of react-highlight-words. This component is used to highlight words within a larger body of text.",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -31,6 +31,7 @@
},
"homepage": "https://github.com/clauderic/react-native-highlight-words",
"dependencies": {
"deprecated-react-native-prop-types": "^2.3.0",
"highlight-words-core": "^1.0.3",
"prop-types": "^15.5.7"
},
Expand Down