diegohaz / generact

Generate React components by replicating your own
https://git.io/generact
MIT License
1.48k stars 64 forks source link

BEM CSS Classes are not completly updated #13

Open Angelmmiguel opened 7 years ago

Angelmmiguel commented 7 years ago

Hello,

I tried to copy a Dashboard component into a new Configuration one. I use CSS BEM notation in this project, so CSS classes are like Dasboard__JobList. The issue is that classes are not updated:

render() {
  return <section className="Configuration">
    <Content>
      <Title>Jobs</Title>
      <div className="Dashboard__JobList">
        { /* ... */ }
      </div>
    </Content>
  </section>;
};

I'll create a PR soon solving this issue. Can you give me any hint to keep in mind for developing your library?

Thanks!

diegohaz commented 7 years ago

Hey, @Angelmmiguel

I think just changing https://github.com/diegohaz/generact/blob/638f95242d4572887802bbe0551974870e69c02f/src/utils.js#L69 should fix this, but it might require some testing.

Angelmmiguel commented 7 years ago

Thanks for the hint! I'll try to solve it :)