Allow hunk specific class names

This commit is contained in:
René Pfeuffer
2020-06-09 15:23:14 +02:00
parent 237bdaf89c
commit 5b35328e42
2 changed files with 3 additions and 0 deletions

View File

@@ -277,12 +277,14 @@ class DiffFile extends React.Component<Props, State> {
if (file._links?.lines) {
items.push(this.createHunkHeader(expandableHunk));
}
items.push(
<Hunk
key={"hunk-" + hunk.content}
hunk={expandableHunk.hunk}
widgets={this.collectHunkAnnotations(hunk)}
gutterEvents={this.createGutterEvents(hunk)}
className={this.props.hunkClass ? this.props.hunkClass(hunk) : null}
/>
);
if (file._links?.lines) {