Problems with documenting components from separate library
See original GitHub issueSo, the case:
- There is a libary on react and typescript
- I want to make documentation for it
- But, none of the methods for documenting components does not work for some reason I’m getting this error every time
Error when parsing UisButton.tsx
Error: No suitable component definition found.
(i cant use propTypes method, but i tried all the other ones, including getExampleFilename method) 4. Main thing: i’m just reexporting react-component, like this:
import {UisButton} from "uikit";
export default UisButton
If i just inline component source code instead of importing and exporting everything suddenly works. What i am doing wrong? Does anybody got that problem before?
(i think my styleguide.config is fine, other setup is good too, because inlining code works, but i cant inline it, because the library is separate package, and i cant place readmes and proptypes inside it, or basically modify in any way)
Also, your library is just insanely good, thank you so much for all your work, good job! I wish I could collaborate, but I’m not experienced enough just yet!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:12 (12 by maintainers)
Top Results From Across the Web
4 Ways to Document a React Component Library
Component libraries are the de-facto modern way to reuse UI components. They help ensure UI consistency across teams and standardize development.
Read more >Use components from component library in solution
When I change one component in the library and update the components in the canvas app output properties of the components are not...
Read more >Documenting Components. Serve a System's Audiences with…
When a library offers code, engineers are an audience. Obviously. If a library is only code, should doc serve designers too? If doc...
Read more >The benefits of component libraries and when not to use one
The data is hardcoded, and that's 100% fine. The component library is UI documentation, so it best to keep the data hardcoded (even...
Read more >Design System documentation best practices - Backlight.dev
One of the pillars of any design system is undoubtedly its documentation, otherwise you would simply end up with a component library, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That might be the case. Is it hard to implement this feature? That would be killer feature, with it you could make docs for independent libraries, without touching any internal source code.
Feel free to send a pull request with a fix.