From 2e75354d72381ac91acf4a1fc1abdcbfd12774d1 Mon Sep 17 00:00:00 2001 From: jiwoo-choi Date: Wed, 8 May 2024 01:44:33 +0900 Subject: [PATCH 1/2] feat: add `paramKey` property to panel object. --- src/manager.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/manager.ts b/src/manager.ts index 61e74cb..163da49 100644 --- a/src/manager.ts +++ b/src/manager.ts @@ -1,5 +1,5 @@ import { addons, types } from "@storybook/manager-api"; -import { ADDON_ID, PANEL_ID } from "./constants"; +import { ADDON_ID, PANEL_ID, PARAM_KEY } from "./constants"; import { Panel } from "./Panel"; // Register the addon @@ -10,5 +10,6 @@ addons.register(ADDON_ID, () => { title: "HTML", match: ({ viewMode }) => viewMode === "story", render: Panel, + paramKey: PARAM_KEY, }); }); From 9fae7e58354f8fe4867404b4bd90af0d0a31b3da Mon Sep 17 00:00:00 2001 From: jiwoo-choi Date: Wed, 8 May 2024 19:52:56 +0900 Subject: [PATCH 2/2] docs: add documentation for `disable` parameter in readme --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 2f4c9b9..ab467f3 100644 --- a/README.md +++ b/README.md @@ -122,3 +122,12 @@ html: { }; } ``` + +You can disable the HTML panel by setting the `disable` parameter to true. +This will hide and disable the HTML addon in your stories. + +```js +html: { + disable: true, // default: false +} +```