You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|splitView |`boolean`|`true`|Switch between `unified` and `split` view. |
65
-
|disableWordDiff |`boolean`|`false`|Do not show word diff in a diff line.|
65
+
|disableWordDiff |`boolean`|`false`|Show and hide word diff in a diff line. |
66
66
|renderContent |`function`|`undefined`|Render Prop API to render code in the diff viewer. Helpful for [syntax highlighting](#syntax-highlighting)|
67
67
|onLineNumberClick |`function`|`undefined`|Event handler for line number click. `(lineId: string) => void`|
68
-
|hightlightLines |`array[string]`|`[]`|List of lines to be highlighted. Works together with `onLineNumberClick`. Line number are prefixed with `L` and `R` for the line numbers on the left and right section of the diff viewer. 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. |
68
+
|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. |
69
69
|styles |`object`|`{}`|To override style variables and styles. Learn more about [overriding styles](#overriding-styles)|
70
70
71
71
## Syntax Highlighting
72
72
73
-
Syntax highlighting is a bit tricky when combined with diff. But, React Diff Viewer provides a simple render prop API to handle syntax highlighting. Use `renderContent(content: string) => JSX.Element` and your favorite syntax highlighting library to acheive this.
73
+
Syntax highlighting is a bit tricky when combined with diff. Here, React Diff Viewer provides a simple render prop API to handle syntax highlighting. Use `renderContent(content: string) => JSX.Element` and your favorite syntax highlighting library to acheive this.
74
74
75
75
An example using [Prism JS](https://prismjs.com)
76
76
@@ -166,7 +166,7 @@ const defaultStyles = {
166
166
}
167
167
```
168
168
169
-
To override any style, simple pass the new style object to the `styles` prop. New style will be computed using `Object.assign(default, override)`.
169
+
To override any style, just pass the new style object to the `styles` prop. New style will be computed using `Object.assign(default, override)`.
170
170
171
171
For keys other than `variables`, the value can either be an object or string interpolation. Emotion's dynamic styles are not yet supported.
0 commit comments