Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove key from addPanel as it is not a valid prop #64

Open
DrJacobHolden opened this issue Dec 2, 2024 · 0 comments
Open

Remove key from addPanel as it is not a valid prop #64

DrJacobHolden opened this issue Dec 2, 2024 · 0 comments

Comments

@DrJacobHolden
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @storybook/addon-knobs@7.0.2.

Specifically - there is an error displaying in the console every time I open a Story which says that key is not a prop. The same issue was fixed for addon-designs in this PR.

Here is the diff that solved my problem:

diff --git a/node_modules/@storybook/addon-knobs/dist/register.js b/node_modules/@storybook/addon-knobs/dist/register.js
index 2a88bf1..f4ef372 100644
--- a/node_modules/@storybook/addon-knobs/dist/register.js
+++ b/node_modules/@storybook/addon-knobs/dist/register.js
@@ -13,11 +13,9 @@ _addons.addons.register(_shared.ADDON_ID, function (api) {
   _addons.addons.addPanel(_shared.PANEL_ID, {
     title: (0, _title.createTitleListener)(api),
     render: function render(_ref) {
-      var active = _ref.active,
-        key = _ref.key;
+      var active = _ref.active;
       return /*#__PURE__*/React.createElement(_Panel["default"], {
         api: api,
-        key: key,
         active: active
       });
     },

This issue body was partially generated by patch-package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant