DefinitelyTyped/react-highlight-words/index.d.ts
Mohamed Hegazy de1d13bd54 Add new packages (#13578)
* Add xstream

* Add bigi

* Add uuid-js

* Add user-home

* Add strip-bom

* Add strip-ansi

* Add slug

* Add safe-regex

* Add react-recaptcha

* Add is-absolute-url

* Add is-archive

* Add is-compressed

* Add is-relative-url

* add is-root-path

* Add is-root

* Add is-text-path

* add os-homedir

* Add os-tmpdir

* Add path-is-absolute

* Add pad

* Add number-is-nan

* Add node-hid

* Add is-finite

* is-path-incwd

* Add indent-string

* Add cpy

* Add camelcase-keys

* Add blacklist

* add http-codes

* clamp-js

* Add checkstyle-formatter

* Add currency-formatter

* Add multi-typeof

* Add intl-messageformat

* Add coinstring

* Add ecurve

* Add bitcoinjs-lib

* Add deep-freeze

* Add fuxxaldrin

* Add react-body-classname

* Add react-highlight-words

* Update headers

* Fix lint errors

* remove xstream

* Code review comments

* Remove clamp-js in favour of https://github.com/DefinitelyTyped/DefinitelyTyped/pull/13527
2016-12-29 12:34:20 -08:00

34 lines
1.3 KiB
TypeScript

// Type definitions for react-highlight-words 0.6
// Project: https://github.com/bvaughn/react-highlight-words#readme
// Definitions by: Mohamed Hegazy <https://github.com/mhegazy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import React = require("react");
export = Highlighter;
interface HighlighterProps {
/** Escape characters which are meaningful in regular expressions */
autoEscape?: boolean;
/** Escape characters which are meaningful in regular expressions */
activeClassName?: string;
/** Specify the match index that should be actively highlighted. Use along with activeClassName */
activeIndex?: string;
/** CSS class name applied to highlighted text */
highlightClassName?: string;
/** Inline styles applied to highlighted text */
highlightStyle?: any;
/** Type of tag to wrap around highlighted matches; defaults to mark */
highlightTag?: string;
/** Process each search word and text to highlight before comparing (eg remove accents); signature (text: string): string */
sanitize?: (text: string) => string;
/** Array of search words */
searchWords: string[];
/** Text to highlight matches in */
textToHighlight: string;
}
declare class Highlighter extends React.Component<HighlighterProps, any> {
static propTypes: any;
}