chore(react/collections/list): add class to title

This commit is contained in:
Elian Doran
2025-08-30 17:00:24 +03:00
parent c13f5a9b04
commit a9c5a3105f
3 changed files with 7 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ import link from "../../services/link";
import RawHtml from "./RawHtml";
interface NoteLinkOpts {
className?: string;
notePath: string | string[];
showNotePath?: boolean;
showNoteIcon?: boolean;
@@ -11,7 +12,7 @@ interface NoteLinkOpts {
noTnLink?: boolean;
}
export default function NoteLink({ notePath, showNotePath, showNoteIcon, style, noPreview, noTnLink }: NoteLinkOpts) {
export default function NoteLink({ className, notePath, showNotePath, showNoteIcon, style, noPreview, noTnLink }: NoteLinkOpts) {
const stringifiedNotePath = Array.isArray(notePath) ? notePath.join("/") : notePath;
const [ jqueryEl, setJqueryEl ] = useState<JQuery<HTMLElement>>();
@@ -33,6 +34,10 @@ export default function NoteLink({ notePath, showNotePath, showNoteIcon, style,
$linkEl?.addClass("tn-link");
}
if (className) {
$linkEl?.addClass(className);
}
return <RawHtml html={jqueryEl} />
}