22 lines · 760 B · TypeScript
RawDownload
import { memo } from "react"; export function hasNonZeroStat(stat: { additions: number; deletions: number }): boolean {  return stat.additions > 0 || stat.deletions > 0;} export const DiffStatLabel = memo(function DiffStatLabel(props: {  additions: number;  deletions: number;  showParentheses?: boolean;}) {  const { additions, deletions, showParentheses = false } = props;  return (    <>      {showParentheses && <span className="text-muted-foreground/70">(</span>}      <span className="text-success">+{additions}</span>      <span className="mx-0.5 text-muted-foreground/70">/</span>      <span className="text-destructive">-{deletions}</span>      {showParentheses && <span className="text-muted-foreground/70">)</span>}    </>  );});

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t