You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// We can't remove the Icons component just yet because there's no way for now to import icons
// in the preview directly. Before having a better solution, we are going to keep the Icons component
// for now and remove the deprecated warning.
Describe the bug
This line of code:
const Icon = icon && <Icons style={{ opacity: 1 }} icon={icon} />;
Should have been:
const Icon = icon && <Icons style={{ opacity: 1 }} icon={icon} __suppressDeprecationWarning={true} />;
Like in
ToolbarMenuButton.tsx
:{icon && <Icons icon={icon} __suppressDeprecationWarning={true} />}
Otherwise I get a very annoying warning in my console, like this:
Reproduction link
https://github.com/storybookjs/storybook/blob/next/code/addons/toolbars/src/components/ToolbarMenuListItem.tsx
Reproduction steps
Go to this file: https://github.com/storybookjs/storybook/blob/next/code/addons/toolbars/src/components/ToolbarMenuButton.tsx
Read the comment:
Read the code:
Go to this file:
https://github.com/storybookjs/storybook/blob/next/code/addons/toolbars/src/components/ToolbarMenuListItem.tsx
There is no comment to read.
And the code is:
It's missing the
__suppressDeprecationWarning
.System
Additional context
No response
The text was updated successfully, but these errors were encountered: