Skip to content

Commit

Permalink
[doc] Update docs to include details about CSS classes
Browse files Browse the repository at this point in the history
  • Loading branch information
claydiffrient committed Apr 9, 2016
1 parent eee9431 commit 7cf8463
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ Accessible modal dialog component for React.JS
isOpen={bool}
onRequestClose={fn}
closeTimeoutMS={n}
style={customStyle}>

style={customStyle}
>
<h1>Modal Content</h1>
<p>Etc.</p>
</Modal>
```

## Styles
Styles are passed as an object with 2 keys, 'overlay' and 'content' like so
```js
Expand Down Expand Up @@ -48,9 +49,17 @@ Styles are passed as an object with 2 keys, 'overlay' and 'content' like so
Styles passed to the modal are merged in with the above defaults and applied to their respective elements.
At this time, media queries will need to be handled by the consumer.

###Overriding styles globally
### Using CSS Classes

If you prefer not to use inline styles or are unable to do so in your project,
you can pass `className` and `overlayClassName` props to the Modal. If you do
this then none of the default styles will apply and you will have full control
over styling via CSS.


The default styles above are available on `Modal.defaultStyles`.
### Overriding styles globally
The default styles above are available on `Modal.defaultStyles`. Changes to this
object will apply to all instances of the modal.

## Examples
Inside an app:
Expand Down

0 comments on commit 7cf8463

Please sign in to comment.