Skip to content

Latest commit

 

History

History
21 lines (18 loc) · 851 Bytes

README.md

File metadata and controls

21 lines (18 loc) · 851 Bytes

HighlightText

Statements Branches Functions Lines
Statements Branches Functions Lines

React component that makes bold all occurrences of highlight text. It apply <stong> html tag to each occurrence.

Install

npm i react-highlight-text

Params

text : string

Full text to compose

highlight: string

Text to find and transform to bold

Use

<HighlightText text="Hello world" highlight="world" />