mirror of
https://github.com/zadam/trilium.git
synced 2025-11-14 01:05:49 +01:00
feat(react/ribbon): port note map partially
This commit is contained in:
16
apps/client/src/widgets/ribbon/NoteMapTab.tsx
Normal file
16
apps/client/src/widgets/ribbon/NoteMapTab.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { TabContext } from "./ribbon-interface";
|
||||
import NoteMapWidget from "../note_map";
|
||||
import { useLegacyWidget } from "../react/hooks";
|
||||
|
||||
export default function NoteMapTab({ note, noteContext }: TabContext) {
|
||||
const noteMapWidget = useLegacyWidget(() => new NoteMapWidget("ribbon"), {
|
||||
noteContext,
|
||||
containerClassName: "note-map-container"
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="note-map-ribbon-widget">
|
||||
{noteMapWidget}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user