entria-components icon indicating copy to clipboard operation
entria-components copied to clipboard

Improving the styleguide

Open renatobenks-zz opened this issue 7 years ago • 1 comments

I have a lot of points to talk about it:

First of all

This repo should be a set of components, right? So, we shouldn't use a ThemeProvider from styled components to use this components because them are composing this custom theme. Providers are a bad way when we talking about open source projects, but of course, in a specific projects, there's another way for it, so it's acceptable use Providers. But this project seems to me a ideia to reuse what already is done, so a provider can be use inside it, but not for the outside, should not be a provider. I think we can improves this, removing ThemeProvider and choosing other way for use that.

But, this is not my critical point here, this removing can be wait! :smile:


So let's to my point:

  • the components here should be only a set of components, without dependencies between them. For this, the components should built-in using components compositions with static components where need it.
  • the components cannot be dependents between them (talking about the styles), they cannot give side-effects for others components. They should be pure components. May, create a storybook for build them separately can helps.

My questions it's move forward the thinking to improve it to be so much better!

renatobenks-zz avatar Oct 20 '17 14:10 renatobenks-zz

Nice point. Feel free to send a PR improving ThemeProvider usage... Remembering that Material UI forces us to wrap our app with it.

We already have storybook: https://entria.github.io/entria-components/

felippepuhle avatar Oct 20 '17 15:10 felippepuhle