File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ import React from 'react';
2
2
import classNames from 'classnames' ;
3
3
import BootstrapMixin from './BootstrapMixin' ;
4
4
import elementType from 'react-prop-types/lib/elementType' ;
5
- import ButtonInput from './ButtonInput' ;
5
+
6
+ const types = [ 'button' , 'reset' , 'submit' ] ;
6
7
7
8
const Button = React . createClass ( {
8
9
mixins : [ BootstrapMixin ] ,
@@ -24,7 +25,7 @@ const Button = React.createClass({
24
25
* @type {("button"|"reset"|"submit") }
25
26
* @defaultValue 'button'
26
27
*/
27
- type : React . PropTypes . oneOf ( ButtonInput . types )
28
+ type : React . PropTypes . oneOf ( types )
28
29
} ,
29
30
30
31
getDefaultProps ( ) {
@@ -101,4 +102,6 @@ const Button = React.createClass({
101
102
}
102
103
} ) ;
103
104
105
+ Button . types = types ;
106
+
104
107
export default Button ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class ButtonInput extends InputBase {
17
17
}
18
18
}
19
19
20
- ButtonInput . types = [ 'button' , 'reset' , 'submit' ] ;
20
+ ButtonInput . types = Button . types ;
21
21
22
22
ButtonInput . defaultProps = {
23
23
type : 'button'
You can’t perform that action at this time.
0 commit comments