Skip to content

components/diff-view

@fungi.computer/caps


@fungi.computer/caps / components/diff-view

DiffViewLine = Readonly<{ kind: "add" | "context" | "file" | "hunk" | "remove"; text: string; }>

One presentational diff line; the caller owns parsing.


DiffViewProps = object & Omit<HTMLAttributes<HTMLPreElement>>, "children">>

Props accepted by DiffView.

lines: readonly DiffViewLine[]

optional hiddenLines?: number

Lines the caller omitted, shown as a trailing note.

DiffView(__namedParameters): Element

A compact monospace diff with add/remove/hunk/file line tones.

DiffViewProps

Element