mirror of
https://github.com/zadam/trilium.git
synced 2025-12-19 22:59:53 +01:00
refactor(layout/inline-title): separate old title details into title actions
This commit is contained in:
15
apps/client/src/widgets/layout/NoteTitleActions.tsx
Normal file
15
apps/client/src/widgets/layout/NoteTitleActions.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user