({ original, modified }: { original: string; modified: string })
| 560 | } |
| 561 | |
| 562 | function DiffEditor({ original, modified }: { original: string; modified: string }) { |
| 563 | const { codeTheme } = useTheme(); |
| 564 | |
| 565 | return ( |
| 566 | <div className="flex flex-col"> |
| 567 | <CodeMirror |
| 568 | value={modified} |
| 569 | theme={codeTheme} |
| 570 | extensions={[ |
| 571 | javascript({ typescript: true }), |
| 572 | EditorView.editable.of(false), |
| 573 | EditorState.readOnly.of(true), |
| 574 | unifiedMergeView({ |
| 575 | original: original, |
| 576 | mergeControls: false, |
| 577 | highlightChanges: false, |
| 578 | }), |
| 579 | ]} |
| 580 | /> |
| 581 | </div> |
| 582 | ); |
| 583 | } |
| 584 | |
| 585 | function FilenameInput(props: { |
| 586 | filename: string; |
nothing calls this directly
no test coverage detected