I'm currently setting up documentation and examples in Storybook. I have added an addon to show the developer the code of the story. And I want to add a link/button "click here to view the code". When the developer clicks on it to open the Toolbar/Addonsbar and focus on the adding for the Code preview.
I'm not finding a way to do it. Can someone give me a hand?
what is the addon you're using to show up the source code right now?
I'm personally using autodoc to have source code and it's working like a charm:
You could also transform the source with this API: https://storybook.js.org/docs/api/doc-block-source#transform