Function
CommitFileAdditions
({
count,
className,
children,
...props
}: CommitFileAdditionsProps)
Source from the content-addressed store, hash-verified
| 395 | }; |
| 396 | |
| 397 | export const CommitFileAdditions = ({ |
| 398 | count, |
| 399 | className, |
| 400 | children, |
| 401 | ...props |
| 402 | }: CommitFileAdditionsProps) => { |
| 403 | if (count <= 0) { |
| 404 | return null; |
| 405 | } |
| 406 | |
| 407 | return ( |
| 408 | <span |
| 409 | className={cn("text-green-600 dark:text-green-400", className)} |
| 410 | {...props} |
| 411 | > |
| 412 | {children ?? ( |
| 413 | <> |
| 414 | <PlusIcon className="inline-block size-3" /> |
| 415 | {count} |
| 416 | </> |
| 417 | )} |
| 418 | </span> |
| 419 | ); |
| 420 | }; |
| 421 | |
| 422 | export type CommitFileDeletionsProps = HTMLAttributes<HTMLSpanElement> & { |
| 423 | count: number; |
Callers
nothing calls this directly
Tested by
no test coverage detected