chore(react/type_widget): port read only code basic functionality

This commit is contained in:
Elian Doran
2025-09-20 08:57:47 +03:00
parent 77e7c414b6
commit f72087acc3
6 changed files with 74 additions and 49 deletions

View File

@@ -15,6 +15,7 @@ import WebView from "./type_widgets/WebView";
import "./NoteDetail.css";
import File from "./type_widgets/File";
import Image from "./type_widgets/Image";
import ReadOnlyCode from "./type_widgets/code/ReadOnlyCode";
/**
* A `NoteType` altered by the note detail widget, taking into consideration whether the note is editable or not and adding special note types such as an empty one,
@@ -72,6 +73,7 @@ function getCorrespondingWidget(noteType: ExtendedNoteType | undefined, props: T
case "webView": return <WebView {...props} />
case "file": return <File {...props} />
case "image": return <Image {...props} />
case "readOnlyCode": return <ReadOnlyCode {...props} />
default: break;
}
}