| 1 | "use client"; |
| 2 | |
| 3 | import { PatchDiff } from |
| 4 | |
| 5 | const options = { |
| 6 | theme: { light: " |
| 7 | diffStyle: "unified", |
| 8 | disableFileHeader: true, |
| 9 | hunkSeparators: "simple", |
| 10 | } as const; |
| 11 | |
| 12 | /** A few rows of a diff, such as the ones a line comment points at, highlighted like the files tab. Renders inside a `DiffsProvider`. */ |
| 13 | export function DiffHunk({ |
| 14 | return ( |
| 15 | <PatchDiff |
| 16 | patch={`diff --git a/${path |
| 17 | options={options} |
| 18 | /> |
| 19 | ); |
| 20 | } |