Bin
2025-12-17 d616898802dfe7e5dd648bcf53c6d1f86b6d3642
1
2
3
4
5
6
7
8
9
10
11
12
import { addons, types } from "storybook/manager-api";
import { ADDON_ID, TOOL_ID } from "./constants";
import { ThemeTool } from "./theme-toggle";
 
addons.register(ADDON_ID, () => {
  addons.add(TOOL_ID, {
    type: types.TOOL,
    title: "Toggle Theme",
    match: ({ tabId, viewMode }: any) => !tabId && (viewMode === "story" || viewMode === "docs"),
    render: ThemeTool,
  } as any);
});