File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -9,12 +9,13 @@ Accessible modal dialog component for React.JS
99 isOpen ={bool}
1010 onRequestClose ={fn}
1111 closeTimeoutMS ={n}
12- style ={customStyle}>
13-
12+ style ={customStyle}
13+ >
1414 <h1 >Modal Content</h1 >
1515 <p >Etc.</p >
1616</Modal >
1717```
18+
1819## Styles
1920Styles are passed as an object with 2 keys, 'overlay' and 'content' like so
2021``` js
@@ -48,9 +49,17 @@ Styles are passed as an object with 2 keys, 'overlay' and 'content' like so
4849Styles passed to the modal are merged in with the above defaults and applied to their respective elements.
4950At this time, media queries will need to be handled by the consumer.
5051
51- ###Overriding styles globally
52+ ### Using CSS Classes
53+
54+ If you prefer not to use inline styles or are unable to do so in your project,
55+ you can pass ` className ` and ` overlayClassName ` props to the Modal. If you do
56+ this then none of the default styles will apply and you will have full control
57+ over styling via CSS.
58+
5259
53- The default styles above are available on ` Modal.defaultStyles ` .
60+ ### Overriding styles globally
61+ The default styles above are available on ` Modal.defaultStyles ` . Changes to this
62+ object will apply to all instances of the modal.
5463
5564## Examples
5665Inside an app:
You can’t perform that action at this time.
0 commit comments