refactor(layout/inline-title): separate old title details into title actions

This commit is contained in:
Elian Doran
2025-12-13 11:46:42 +02:00
parent e9dfec88c9
commit f040a0b6d1
4 changed files with 33 additions and 28 deletions

View File

@@ -0,0 +1,15 @@
import CollectionProperties from "../note_bars/CollectionProperties";
import { useNoteContext, useNoteProperty } from "../react/hooks";
import "./NoteTitleActions.css";
export default function NoteTitleActions() {
const { note } = useNoteContext();
const isHiddenNote = note && note.noteId !== "_search" && note.noteId.startsWith("_");
const noteType = useNoteProperty(note, "type");
return (
<div className="title-actions">
{note && !isHiddenNote && noteType === "book" && <CollectionProperties note={note} />}
</div>
);
}