seek-oss / playroom

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

feat: Support sub-components #243

Open AndrewLeedham opened 2 years ago

AndrewLeedham commented 2 years ago

fixes: #172

Includes all component names gathered from staticTypes as well as the imported components when creating hints for CodeMirror. This only fixes the sub-component issue for people using react-docgen-typescript, I am not sure there is a good way to fix it for regular JavaScript users.

AndrewLeedham commented 2 years ago

@michaeltaranto perhaps for JavaScript users there could be a manual option in the config to specify "known components" like babel-plugin-add-react-displayname does, so at least there is a way to manually hint sub-components?