MCPcopy Index your code
hub / github.com/srcbookdev/srcbook / DiffEditor

Function DiffEditor

packages/components/src/components/cells/code.tsx:562–583  ·  view source on GitHub ↗
({ original, modified }: { original: string; modified: string })

Source from the content-addressed store, hash-verified

560}
561
562function 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
585function FilenameInput(props: {
586 filename: string;

Callers

nothing calls this directly

Calls 1

useThemeFunction · 0.85

Tested by

no test coverage detected