Skip to content

Commit 4d90822

Browse files
committed
Added README instructions
1 parent a6dd179 commit 4d90822

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,22 @@ var App = React.createClass({
124124
ReactDOM.render(<App/>, appElement);
125125
```
126126

127+
By default the modal is closed when clicking outside of it (the overlay area). If you want to prevent this behavior you can
128+
pass the 'shouldCloseOnOverlayClick' prop with 'false' value.
129+
```xml
130+
<Modal
131+
isOpen={bool}
132+
onRequestClose={fn}
133+
closeTimeoutMS={n}
134+
shouldCloseOnOverlayClick={false}
135+
style={customStyle}>
136+
137+
<h1>Force Modal</h1>
138+
<p>Modal cannot be closed when clickig the overlay area</p>
139+
<button onClick={handleCloseFunc}>Close Modal...</button>
140+
</Modal>
141+
```
142+
127143
# Demos
128144
* http://reactjs.github.io/react-modal/
129145
* http://reactjs.github.io/react-modal/bootstrap

0 commit comments

Comments
 (0)