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

This commit is contained in:
Adorian Doran 2025-12-19 02:30:46 +02:00
parent 8e245ccad8
commit 5ce81f1a32

View File

@ -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"