Skip to content

Commit 6c5cdc4

Browse files
committed
add info for Base icon
1 parent ab00780 commit 6c5cdc4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

apps/obsidian/src/components/DiscourseContextView.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
Notice,
66
FrontMatterCache,
77
setIcon,
8+
setTooltip,
89
} from "obsidian";
910
import { createRoot, Root } from "react-dom/client";
1011
import DiscourseGraphPlugin from "~/index";
@@ -157,12 +158,14 @@ const DiscourseContext = ({ activeFile }: DiscourseContextProps) => {
157158
)}
158159
{nodeType.name || "Unnamed Node Type"}
159160
<button
161+
ref={(el) => {
162+
if (el)
163+
setTooltip(el, `Create Base view for ${nodeType.name} nodes`);
164+
}}
160165
onClick={() => {
161166
void createBaseForNodeType(plugin, nodeType);
162167
}}
163168
className="clickable-icon ml-1"
164-
title={`Create Base view for ${nodeType.name}`}
165-
aria-label={`Create Base view for ${nodeType.name}`}
166169
>
167170
<div
168171
ref={(el) => (el && setIcon(el, "layout-list")) || undefined}

0 commit comments

Comments
 (0)