Skip to content

Build your personal knowledge base with Trilium Notes

client/note title widget: add support for custom CSS class name

Adorian Doran5ce81f1a3262
diff --git a/apps/client/src/widgets/note_title.tsx b/apps/client/src/widgets/note_title.tsx
index 7f7f0cd221..b2f8e68697 100644
--- a/apps/client/src/widgets/note_title.tsx
+++ b/apps/client/src/widgets/note_title.tsx
@@ -9,8 +9,9 @@ import { isLaunchBarConfig } from "../services/utils";
import appContext from "../components/app_context";
import branches from "../services/branches";
import { isIMEComposing } from "../services/shortcuts";
+import clsx from "clsx";
-export default function NoteTitleWidget() {
+export default function NoteTitleWidget(props: {className?: string}) {
const { note, noteId, componentId, viewScope, noteContext, parentComponent } = useNoteContext();
const title = useNoteProperty(note, "title", componentId);
const isProtected = useNoteProperty(note, "isProtected");
@@ -67,7 +68,7 @@ export default function NoteTitleWidget() {
});
return (
- <div className="note-title-widget">
+ <div className={clsx("note-title-widget", props.className)}>
{note && <FormTextBox
inputRef={textBoxRef}
autocomplete="off"