-
Notifications
You must be signed in to change notification settings - Fork 249
Expand file tree
/
Copy pathindex.tsx
More file actions
29 lines (26 loc) · 778 Bytes
/
index.tsx
File metadata and controls
29 lines (26 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { StudioExtension } from "@/core/extension-base";
import { StudioExtensionManager } from "@/core/extension-manager";
import { createTabExtension } from "@/core/extension-tab";
import { NotebookIcon } from "lucide-react";
import NotebookTab from "./notebook-tab";
const notebookTab = createTabExtension({
name: "notebook",
key: () => "notebook",
generate: () => ({
title: "New Notebook",
component: <NotebookTab />,
icon: NotebookIcon,
}),
});
export default class NotebookExtension extends StudioExtension {
extensionName = "notebook";
init(studio: StudioExtensionManager): void {
studio.registerWindowTabMenu({
key: "notebook",
title: "New Notebook",
onClick: () => {
notebookTab.open({});
},
});
}
}