MrBartusek / gif-picker-react

Tenor GIF Picker component for React ⚛️
http://dokurno.dev/gif-picker-react/
MIT License
38 stars 12 forks source link

Dynamically set columns count #14

Closed MrBartusek closed 1 year ago

MrBartusek commented 1 year ago

The code for generating columns is hard-coded for two as of now:

https://github.com/MrBartusek/gif-picker-react/blob/master/src/components/body/GifList.tsx#L43-L63

That means the picker looks good with the default or similar to the default width but will look horribly on other ones:

image

This count of columns should be dynamically set depending on the picker's width. This also means the height of the categories which is controlled by categoryHeight should be removed or replaced with something like categoryAspectRatio since it too, will be dynamic.