Hi storybook team,
I am wondering whether storybook support show the sample code on the storybook site for the component that display on page?
Like I write a Button component, and I want to show developers how to use the component?
import Button from '/components/Button';
<Button>This is a button.</Button>
One of the options is to use addon-info
https://github.com/storybooks/storybook/tree/master/addons/info
@igor-dv Thanks a lot, it works.
Can storybook display the sample html code for the component????
Want to know if storybook can display HTML code +1
Try the storysource addon
One of the options is to use
addon-info
https://github.com/storybooks/storybook/tree/master/addons/info
addon-info
is only compatible with react though, we use Angular here so can't use it 馃槩
@blemaire check out https://github.com/storybooks/storybook/tree/master/addons/storysource
We have this setup but there is a lot of noise being displayed (still better than nothing to be fair)
@blemaire Will be fixing this as part of Storybook Docs: https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a
I saw this medium post a little while and have been dying for this to come out.
I've got a couple of side projects going at the moment but when the time is right, I'd like to get onboard (if you need extra fingertips)
@blemaire Please join the #docs-mode
channel on our Discord for docs-related chatter. Would love to have you involved!
@shilman already in there 馃槃 @Agaurooh#4198
it is not possible to show the component and template for angular right now, is it? am i missing something?
Most helpful comment
Can storybook display the sample html code for the component????