Skip to content

Commit

Permalink
updated icon
Browse files Browse the repository at this point in the history
  • Loading branch information
oxdc committed Feb 16, 2025
1 parent 876580d commit f4e0545
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/icon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const VERTICAL_TABS_ICON = `
<path d="M20.8333 8.33333L79.1667 8.33333" stroke="currentColor" stroke-width="8" stroke-linecap="round" stroke-linejoin="round" fill="none" />
<path d="M49.5225 48.6766C49.3723 48.2998 49.3359 47.8872 49.4177 47.4899C49.4995 47.0926 49.6959 46.7279 49.9828 46.4411C50.2696 46.1542 50.6343 45.9578 51.0316 45.876C51.4289 45.7942 51.8415 45.8306 52.2183 45.9808L89.7183 60.5641C90.1204 60.7212 90.4637 60.9993 90.7009 61.36C90.938 61.7207 91.0573 62.1461 91.0422 62.5775C91.0271 63.0088 90.8784 63.4249 90.6166 63.7681C90.3548 64.1113 89.9929 64.3647 89.5809 64.4933L75.2309 68.9433C74.5834 69.1435 73.9945 69.4986 73.5153 69.9778C73.0361 70.457 72.681 71.0459 72.4809 71.6933L68.035 86.0392C67.9064 86.4512 67.653 86.8131 67.3098 87.0749C66.9666 87.3367 66.5505 87.4854 66.1192 87.5005C65.6878 87.5156 65.2624 87.3963 64.9017 87.1592C64.541 86.922 64.2629 86.5787 64.1059 86.1766L49.5225 48.6766Z" stroke="currentColor" stroke-width="8" stroke-linecap="round" stroke-linejoin="round" fill="none" />
<path d="M20.8333 91.6667H47.9167" stroke="currentColor" stroke-width="8" stroke-linecap="round" stroke-linejoin="round" fill="none" />
<path d="M87.5 41.6667V33.3333C87.5 28.731 83.769 25 79.1667 25H20.8333C16.231 25 12.5 28.731 12.5 33.3333V66.6667C12.5 71.269 16.231 75 20.8333 75H41.6667" stroke="currentColor" stroke-width="8" stroke-linecap="round" stroke-linejoin="round" fill="none" />
`;
6 changes: 4 additions & 2 deletions src/navigation.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { StrictMode } from "react";
import { ItemView, WorkspaceLeaf } from "obsidian";
import { addIcon, ItemView, WorkspaceLeaf } from "obsidian";
import { Root, createRoot } from "react-dom/client";
import { NavigationContainer } from "./components/NavigationContainer";
import { PluginContext } from "./models/PluginContext";
import ObsidianVerticalTabs from "./main";
import { VERTICAL_TABS_ICON } from "./icon";

export const VIEW_TYPE = "vertical-tabs";

Expand All @@ -13,9 +14,10 @@ export class NavigationView extends ItemView {

constructor(leaf: WorkspaceLeaf, plugin: ObsidianVerticalTabs) {
super(leaf);
addIcon("vertical-tabs", VERTICAL_TABS_ICON);
this.navigation = false;
this.plugin = plugin;
this.icon = "gallery-vertical";
this.icon = "vertical-tabs";
this.leaf.containerEl?.addClass("obsidian-vertical-tabs-tab-content");
this.leaf.tabHeaderEl?.addClass("obsidian-vertical-tabs-tab-header");
}
Expand Down

0 comments on commit f4e0545

Please sign in to comment.