Skip to content
API reference

components/diff-view

Import
import * as api from "@fungi.computer/caps/components/diff-view";
Kind Export Description
type alias DiffViewLine One presentational diff line; the caller owns parsing.
type alias DiffViewProps Props accepted by DiffView.
function DiffView() A compact monospace diff with add/remove/hunk/file line tones.

DiffViewLinetype alias

Section titled “DiffViewLine”
Signature
type DiffViewLine = Readonly<{
kind: "add" | "context" | "file" | "hunk" | "remove";
text: string;
}>;

One presentational diff line; the caller owns parsing.


DiffViewPropstype alias

Section titled “DiffViewProps”
Signature
type DiffViewProps = object & Omit<HTMLAttributes<HTMLPreElement>, "children">;

Props accepted by DiffView.

Name Type Description
lines readonly DiffViewLine[] -
hiddenLines? number Lines the caller omitted, shown as a trailing note.
Signature
function DiffView(__namedParameters): Element;

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

Parameter Type
__namedParameters DiffViewProps

Element