File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ const Modal = React.createClass({
163
163
let modal = (
164
164
< Dialog { ...props }
165
165
ref = { this . _setDialogRef }
166
- className = { classNames ( { in : show && ! animation } ) }
166
+ className = { classNames ( this . props . className , { in : show && ! animation } ) }
167
167
onClick = { backdrop === true ? this . handleBackdropClick : null }
168
168
>
169
169
{ this . renderContent ( ) }
Original file line number Diff line number Diff line change @@ -130,6 +130,19 @@ describe('Modal', function () {
130
130
ReactTestUtils . Simulate . click ( button ) ;
131
131
} ) ;
132
132
133
+ it ( 'Should pass className to the dialog' , function ( ) {
134
+ let noOp = function ( ) { } ;
135
+ let instance = render (
136
+ < Modal show className = 'mymodal' onHide = { noOp } >
137
+ < strong > Message</ strong >
138
+ </ Modal >
139
+ , mountPoint ) ;
140
+
141
+ let dialog = React . findDOMNode ( instance . refs . dialog ) ;
142
+
143
+ assert . ok ( dialog . className . match ( / \b m y m o d a l \b / ) ) ;
144
+ } ) ;
145
+
133
146
it ( 'Should use bsClass on the dialog' , function ( ) {
134
147
let noOp = function ( ) { } ;
135
148
let instance = render (
You can’t perform that action at this time.
0 commit comments