File tree 1 file changed +30
-27
lines changed
1 file changed +30
-27
lines changed Original file line number Diff line number Diff line change @@ -98,34 +98,37 @@ Example:
98
98
99
99
## Styles
100
100
101
- Styles are passed as an object with 2 keys, 'overlay' and 'content' like so
101
+ Styles are passed with the ` style ` prop, an object with 2 keys, 'overlay' and 'content' like so
102
102
103
- ``` js
104
- {
105
- overlay : {
106
- position : ' fixed' ,
107
- top : 0 ,
108
- left : 0 ,
109
- right : 0 ,
110
- bottom : 0 ,
111
- backgroundColor : ' rgba(255, 255, 255, 0.75)'
112
- },
113
- content : {
114
- position : ' absolute' ,
115
- top : ' 40px' ,
116
- left : ' 40px' ,
117
- right : ' 40px' ,
118
- bottom : ' 40px' ,
119
- border : ' 1px solid #ccc' ,
120
- background : ' #fff' ,
121
- overflow : ' auto' ,
122
- WebkitOverflowScrolling : ' touch' ,
123
- borderRadius : ' 4px' ,
124
- outline : ' none' ,
125
- padding : ' 20px'
126
-
127
- }
128
- }
103
+ ``` jsx
104
+ < Modal
105
+ ...
106
+ style= {{
107
+ overlay: {
108
+ position: ' fixed' ,
109
+ top: 0 ,
110
+ left: 0 ,
111
+ right: 0 ,
112
+ bottom: 0 ,
113
+ backgroundColor: ' rgba(255, 255, 255, 0.75)'
114
+ },
115
+ content: {
116
+ position: ' absolute' ,
117
+ top: ' 40px' ,
118
+ left: ' 40px' ,
119
+ right: ' 40px' ,
120
+ bottom: ' 40px' ,
121
+ border: ' 1px solid #ccc' ,
122
+ background: ' #fff' ,
123
+ overflow: ' auto' ,
124
+ WebkitOverflowScrolling: ' touch' ,
125
+ borderRadius: ' 4px' ,
126
+ outline: ' none' ,
127
+ padding: ' 20px'
128
+ }
129
+ }}
130
+ ...
131
+ >
129
132
```
130
133
131
134
Styles passed to the modal are merged in with the above defaults and applied to their respective elements.
You can’t perform that action at this time.
0 commit comments