paulcollett / react-masonry-css

React Masonry layout component powered by CSS, dependancy free
https://paulcollett.github.io/react-masonry-css/demo/
MIT License
957 stars 66 forks source link

Add support for css modules #76

Open arjanvillon opened 3 years ago

arjanvillon commented 3 years ago

This is a great package! Great work guys. I just want to suggest a new feature to support css modules when adding a className or columnClassName.

mienaikoe commented 3 years ago

I'm using css modules with react-masonry-css, albeit in a basic way. What is missing that prevents you from using css modules?

fondberg commented 3 years ago

Can you provide an example?

C-Garza commented 2 years ago

Could you not do something like this?:

      <Masonry 
        breakpointCols={3}
        className={`${styles.grid}`}
        columnClassName={styles.grid__column}
      >
        {/* array of JSX items */}
      </Masonry>