storybookjs / frontpage

🌐 The website for storybook.js.org
https://storybook.js.org
MIT License
212 stars 116 forks source link

[@mui/material]: (Storybook v8 )- Using react-docgen-typescript for showing controls results in "Show Code" being messed up #683

Open melon2504 opened 3 months ago

melon2504 commented 3 months ago

Details

Recipe Page: @mui/material Recipe Template: @mui/material Browser: All

What is wrong

I have followed the following link of setting MUI with storybook. https://storybook.js.org/recipes/@mui/material

The above definitely results in showing controls for all MUI props, but the "Show Code" in docs section is messed up. It worked fine in v7 of storybook.

Check the Docs section for Button Component in the storybook sandbox: https://stackblitz.com/edit/github-qvoztx-kzoyvk?file=.storybook%2Fmain.ts

Screenshots

image

If I omit the typescript config in main.ts - code is shown correctly.

chengwuchao commented 3 months ago

I also encountered this problem. Is there any solution ?