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
I've seen "issues" that mention this but they seem older and seem to have been resolved, so maybe this is more an issue with what i'm trying to do, and not something broken.
when viewing the "show code" portion of a story, i'm expecting to see the rendered component and all props but for some components i get something like this
when in the story i would have passed an svg icon component for example, and either an inline or named function on the click event.
I've played with using the transform to render the code and that helps some, but i still end up seeing the wrapper around the component like: {render: (<Button ...
is there a way to build these components that the show code will display the component and any other js needed to help developers understand the component -> or is there some best practice pattern i'm just trying to create and this shouldn't really be an issue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
Storybook version: 8,
React version: 18
I've seen "issues" that mention this but they seem older and seem to have been resolved, so maybe this is more an issue with what i'm trying to do, and not something broken.
when viewing the "show code" portion of a story, i'm expecting to see the rendered component and all props but for some components i get something like this
<Button Icon= {<React.Memo />} onClick={() =>{}} label='test' />
when in the story i would have passed an svg icon component for example, and either an inline or named function on the click event.
I've played with using the transform to render the code and that helps some, but i still end up seeing the wrapper around the component like:
{render: (<Button ...
is there a way to build these components that the show code will display the component and any other js needed to help developers understand the component -> or is there some best practice pattern i'm just trying to create and this shouldn't really be an issue.
Additional information
No response
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions