Skip to content

Commit

Permalink
Use a new class instead of inline styling to apply cursor: pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwiles committed Sep 26, 2020
1 parent 0dcb1e2 commit 406a4b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions components/textdiff/textdiff.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ class TextDiffViewModel {
return this.getPatchCheckBox(capture, index, this.patchLineList()[index++]);
}
);
return `<td class="${tdClass}" ${
this.editState() === 'patched' ? 'style="cursor:pointer"' : ''
} data-bind="click: toggleCheckboxFromRowClick">${content}</td>`;
return `<td class="${tdClass}" data-bind="click: toggleCheckboxFromRowClick, css: { patched: editState() === 'patched' }">${content}</td>`;
}
);
}
Expand Down
4 changes: 4 additions & 0 deletions components/textdiff/textdiff.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
padding: 10px 0;
text-align: center;
}

td.patched {
cursor: pointer;
}
}

0 comments on commit 406a4b0

Please sign in to comment.