mirror of
https://github.com/zadam/trilium.git
synced 2025-12-20 15:19:56 +01:00
32 lines
806 B
TypeScript
32 lines
806 B
TypeScript
|
|
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>
|
||
|
|
)
|
||
|
|
}
|