feat(react/ribbon): port note paths tab

This commit is contained in:
Elian Doran
2025-08-22 21:45:03 +03:00
parent 8287063aab
commit 8f69b87dd1
10 changed files with 161 additions and 170 deletions

View File

@@ -6,9 +6,10 @@ interface NoteLinkOpts {
notePath: string | string[];
showNotePath?: boolean;
style?: Record<string, string | number>;
noPreview?: boolean;
}
export default function NoteLink({ notePath, showNotePath, style }: NoteLinkOpts) {
export default function NoteLink({ notePath, showNotePath, style, noPreview }: NoteLinkOpts) {
const stringifiedNotePath = Array.isArray(notePath) ? notePath.join("/") : notePath;
const [ jqueryEl, setJqueryEl ] = useState<JQuery<HTMLElement>>();
@@ -21,6 +22,13 @@ export default function NoteLink({ notePath, showNotePath, style }: NoteLinkOpts
jqueryEl?.css(style);
}
const $linkEl = jqueryEl?.find("a");
if (noPreview) {
$linkEl?.addClass("no-tooltip-preview");
}
$linkEl?.addClass("tn-link");
return <RawHtml html={jqueryEl} />
}