Skip to content

Release 2.0.0

Compare
Choose a tag to compare
@fmkra fmkra released this 08 Dec 21:35
· 17 commits to development since this release

Moved resize handling from JS to CSS

Image dimensions are now determined in the initial component render and stored in CSS variables. It allows to server render the component with images of proper dimensions. If the Gallery component is used as a Server Component, it is shipped to the user with 0kB of JS.

Removed all state logic

Including initialState property as well as state and setState arguments of overlay function if favor of user defined state management (for example using react context API).

Removed name optional attribute of images property

Also changed first (and now only) overlay function argument from name to index which is the element index in images array.

Removed spanLastRow property in favor of lastRowBehavior