wldyslw / react-bottom-sheet

React component for iOS- and Android-like bottom sheet
https://wldyslw.github.io/react-bottom-sheet/
MIT License
9 stars 1 forks source link

content height sheet #8

Open mohofo7 opened 9 months ago

mohofo7 commented 9 months ago

Thank you for this package. I really appreciate that

I have a question. Can there be an option to open the bottom sheet of the size of the content?

wldyslw commented 9 months ago

Appreciate your feedback!

For now there is no special API for that, but theoretically you can measure your content size (e.g. inside useLayoutEffect hook) and dynamically pass detents prop.

If you really wish to have this feature out of the box, feel free to propose API that fits your use-case so we can discuss and implement it.