You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tested this change and it works nicely. The user will need to provide the height as a string, otherwise it won't work. It could be improved by also supporting a number and adding px if the value is a number (or % if that feels more intuitive).
I've made a branch with this change, but cannot push. Happy to help if someone can give me the necessary permissions :)
The text was updated successfully, but these errors were encountered:
P.S. While I get that sheets are typically capped near the top of the (safe) viewport, I think this a useful addition because occasionally you want a sheet to take over the screen and it's a shame you can't use this library for that, because it has amazing interaction handling. This addition keeps the default as before, so nothing more is expected from the dev unless they really want to change the maxHeight.
The problem
Currently, the sheet container cannot get any taller than the MAX_HEIGHT defined in
constants.ts
:That
34px
feels a bit arbitrary :)It means that, afaik, there is no way to let the sheet extend:
A solution
In the
SheetContainer.tsx
, add maxHeight as an optional parameter for the component:Then when determining the height, use the new
maxHeight
to determine the height:Next steps
I tested this change and it works nicely. The user will need to provide the height as a string, otherwise it won't work. It could be improved by also supporting a number and adding
px
if the value is a number (or%
if that feels more intuitive).I've made a branch with this change, but cannot push. Happy to help if someone can give me the necessary permissions :)
The text was updated successfully, but these errors were encountered: