Closed gustavopch closed 7 years ago
Good point, I just added your suggestion. Plus, the body class is changed to ReactSwipeableBottomSheet--closed
when it's closed.
@manufont Nice! Could you update de npm version?
@gustavopch Done !
@manufont Now I noted you applied the className to the bottom sheet's own "body" element. I was actually referring to the
of the page, as react-modal does.
There are cases where one may want to set
body { overflow: hidden }
to avoid two scrollbars at the same time: one for the body and one for the bottom sheet, but as discussed in #6 the bottom sheet should not interfere with the page layout.Maybe this component should do the same as https://github.com/reactjs/react-modal#body-class does: add a class (e.g.:
ReactSwipeableBottomSheet--open
) to the body when it's open. Then the user can define whatever CSS rules he wants using such CSS class.This would cover most of the cases while not imposing anything.