Skip to content

Commit

Permalink
feat: Display +/- count of generated code while hovering
Browse files Browse the repository at this point in the history
  • Loading branch information
aklinker1 committed Jan 19, 2024
1 parent ebbec6c commit 6d65908
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/createDiffComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export function createDiffComponent(options: {
generated.id = DIFF_COMPONENT_ID;
generated.textContent = options.getGeneratedText(stats.exclude.changes);
generated.style.color = GREY_COLOR;
const generatedAdditionsText = `+${stats.exclude.additions}`;
const generatedDeletionsText = `−${stats.exclude.deletions}`;
generated.title = `${generatedAdditionsText} ${generatedDeletionsText}`;
spinner.replaceWith(generated);
} else {
hideSpinner();
Expand Down

0 comments on commit 6d65908

Please sign in to comment.