mirror of
https://github.com/zadam/trilium.git
synced 2025-12-21 07:39:55 +01:00
react(quick_edit): set up empty dialog
This commit is contained in:
31
apps/client/src/widgets/dialogs/PopupEditor.tsx
Normal file
31
apps/client/src/widgets/dialogs/PopupEditor.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user