倉庫指標
- Star
- (11,091 star)
- PR 合併指標
- (PR 指標待抓取)
描述
Many design systems can be used simply as a CSS library as well as React component library.
The styleguides document how to use the components both as React and as pure HTML with CSS classes. E.g.: https://designsystem.gov.au/components/buttons/
We are using Styleguidist and would like to add a "View HTML" button next the the "View Code" button that presents a read-only view of the currently rendered React component.
This would allow users to just download our CSS bundle and implement our components using which rendering technology is appropriate to them.
I haven't tried implementing this yet, but I would look at ways of accessing the innerHTML of a rendered Preview in Playground, though I realise this is a little quirky from a React perspective.
I would make the feature optional, and update slots to take a configuration object to determine whether to include the extra tab button and panel.
Happy to have a go at creating a pull request if you would be happy including this feature in React Styleguidist.