seek-oss / playroom

Design with JSX, powered by your own component library.
MIT License
4.48k stars 182 forks source link

Filter out exports that are not components #246

Open mihkeleidast opened 3 years ago

mihkeleidast commented 3 years ago

Our library exports some helper functions in addition to React components. Playroom does not look at what is exported and adds everything to suggestions: image

Two possible solutions I see here:

  1. Filter out exports that are not capitalized - AFAIK there is a requirement that all React components start with a capital letter.
  2. Let the user provide a filter function in the config.

Would this be a good improvement and which solution should it use?