Diff
Diff component for side-by-side comparison of two items (text, code, etc.).
Text Diff
Before
Old content that needs to be changed
After
New content that replaces the old
<.diff left="Old content" right="New content" />
Code Diff
Before
function old() {\n return 'old';\n}
After
function new() {\n return 'new';\n}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| left | string | - | Left side content |
| right | string | - | Right side content |
| type | atom | :text | Content type (:text or :code) |