IIIF-Commons / thumbnail-panel

https://thumbnail-panel.netlify.app
MIT License
3 stars 1 forks source link

Allow the ThumbnailPanel component to be controlled/uncontrolled #25

Closed adamjarling closed 1 year ago

adamjarling commented 1 year ago

For ease of use, some consumers might want the app to handle all the logic internally (such as "active" or "current" resource id), in a controlled way.

One pattern might be to allow 2 props, say value and onValueChanged (like Radix does it), and if value exists when the component loads, we know the component will be uncontrolled.