patrickgalbraith / react-equalizer

Pure React Match Height Component
MIT License
33 stars 9 forks source link

Enforce a square option #12

Open kevincolten opened 7 years ago

kevincolten commented 7 years ago

Here's a POC PR that enforces a square element. It chooses the max width of all the elements, compares it against the tallest element, then sets all the elements' width to the larger measure. I'm using it in a project already and can clean it up if it seems valuable.