react(quick_edit): set up empty dialog

This commit is contained in:
Elian Doran
2025-11-22 19:07:50 +02:00
parent 435b856b72
commit 31180afbd1
5 changed files with 96 additions and 100 deletions

View File

@@ -0,0 +1,31 @@
import { useState } from "preact/hooks";
import Modal from "../react/Modal";
import "./PopupEditor.css";
import { useTriliumEvent } from "../react/hooks";
import NoteTitleWidget from "../note_title";
import NoteIcon from "../note_icon";
export default function PopupEditor() {
const [ shown, setShown ] = useState(false);
useTriliumEvent("openInPopup", () => {
setShown(true);
});
return (
<Modal
title={(
<div className="title-row">
<NoteIcon />
<NoteTitleWidget />
</div>
)}
className="popup-editor-dialog"
size="lg"
show={shown}
onHidden={() => setShown(false)}
>
Body goes here
</Modal>
)
}