storybookjs / addon-designs

A Storybook addon that embeds Figma, websites, or images in the addon panel.
https://storybookjs.github.io/addon-designs
MIT License
876 stars 72 forks source link

Warning in console after installing addon #204

Closed markokos01 closed 1 year ago

markokos01 commented 1 year ago

Affected design types

Describe the bug

I get the warning in the console after I added addon in main.ts.

Warning: render: key is not a prop. Trying to access it will result in undefined being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://fb.me/react-special-props)

How to reproduce the bug?

  1. Install @storybook/addon-designs
  2. Add addon to main.ts
  3. Run storybook

Expected behaviour

I do not expect any errors in console.

Environment

Affected versions

7.0.1

Storybook versions

7.2.1

mayerraphael commented 1 year ago

Problem is the register Method in index.js line 50

...
 else {
            addons.addPanel(PanelName, {
                title: title,
                paramKey: ParameterName,
                render: function (_a) {
                    var active = _a.active, key = _a.key;  // This line here.
                    return (jsx(AddonPanel, { key: key, active: !!active },
                        jsx(ErrorBoundary, null,
                            jsx(Wrapper, { active: !!active }))));
                },
            });
        }
    });
...
pocka commented 1 year ago

Upstream bug. https://github.com/storybookjs/storybook/issues/23782