Skip to content

Commit e9fd43d

Browse files
ksaclaydiffrient
ksa
authored andcommitted
Document ReactModal__Body--open so people dare to use it
1 parent 3d8e5a0 commit e9fd43d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Diff for: README.md

+11
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,17 @@ This doesn't affect styling as no styles are applied to this element by default.
7373
The default styles above are available on `Modal.defaultStyles`. Changes to this
7474
object will apply to all instances of the modal.
7575

76+
### Body class
77+
When the modal is opened a `ReactModal__Body--open` class is added to the `body` tag.
78+
You can use this to remove scrolling on the the body while the modal is open.
79+
80+
```CSS
81+
/* Remove scroll on the body when react-modal is open */
82+
.ReactModal__Body--open {
83+
overflow: hidden;
84+
}
85+
```
86+
7687
## Examples
7788
Inside an app:
7889

0 commit comments

Comments
 (0)