Skip to content

Commit 9ea6ccc

Browse files
committed
Update README for release
1 parent 57e7348 commit 9ea6ccc

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
> This is an beta version. Not ready for production yet. Please report any bug if discovered.
2-
31
<br/>
42
<br/>
53
<br/>
@@ -23,11 +21,11 @@ Inspired from Github's diff viewer, it includes features like split view, inline
2321
## Install
2422

2523
```bash
26-
yarn add react-diff-viewer@beta
24+
yarn add react-diff-viewer
2725

2826
# or
2927

30-
npm i react-diff-viewer@beta
28+
npm i react-diff-viewer
3129
```
3230

3331
## Usage
@@ -73,13 +71,13 @@ class Diff extends PureComponent {
7371
|Prop |Type |Default |Description |
7472
|------------------|---------------|--------------|----------------------------------------------|
7573
|oldValue |`string` |`''` |Old value as string. |
76-
|newVlaue |`string` |`''` |New value as string. |
74+
|newValue |`string` |`''` |New value as string. |
7775
|splitView |`boolean` |`true` |Switch between `unified` and `split` view. |
7876
|disableWordDiff |`boolean` |`false` |Show and hide word diff in a diff line. |
7977
|hideLineNumbers |`boolean` |`false` |Show and hide line numbers. |
8078
|renderContent |`function` |`undefined` |Render Prop API to render code in the diff viewer. Helpful for [syntax highlighting](#syntax-highlighting) |
8179
|onLineNumberClick |`function` |`undefined` |Event handler for line number click. `(lineId: string) => void` |
82-
|hightlightLines |`array[string]`|`[]` |List of lines to be highlighted. Works together with `onLineNumberClick`. Line number are prefixed with `L` and `R` for the left and right section of the diff viewer, respectively. For example, `L-20` means 20th line in the left pane. To highlight a range of line numbers, pass the prefixed line number as an array. For example, `[L-2, L-3, L-4, L-5]` will highlight the lines `2-5` in the left pane. |
80+
|highlightLines |`array[string]`|`[]` |List of lines to be highlighted. Works together with `onLineNumberClick`. Line number are prefixed with `L` and `R` for the left and right section of the diff viewer, respectively. For example, `L-20` means 20th line in the left pane. To highlight a range of line numbers, pass the prefixed line number as an array. For example, `[L-2, L-3, L-4, L-5]` will highlight the lines `2-5` in the left pane. |
8381
|showDiffOnly |`boolean` |`true` |Shows only the diffed lines and folds the unchanged lines|
8482
|extraLinesSurroundingDiff|`number`|`3` |Number of extra unchanged lines surrounding the diff. Works along with `showDiffOnly`.|
8583
|codeFoldMessageRenderer|`function`|`Expand {number} of lines ...` |Render Prop API to render code fold message.|
@@ -222,7 +220,7 @@ if(a === 10) {
222220

223221
class Diff extends PureComponent {
224222

225-
highlightSyntax = str => <pre
223+
highlightSyntax = str => <span
226224
style={{ display: 'inline' }}
227225
dangerouslySetInnerHTML={{ __html: Prism.highlight(str, Prism.languages.javascript) }}
228226
/>

0 commit comments

Comments
 (0)