File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ import React from 'react';
22import classNames from 'classnames' ;
33import BootstrapMixin from './BootstrapMixin' ;
44import elementType from 'react-prop-types/lib/elementType' ;
5- import ButtonInput from './ButtonInput' ;
5+
6+ const types = [ 'button' , 'reset' , 'submit' ] ;
67
78const Button = React . createClass ( {
89 mixins : [ BootstrapMixin ] ,
@@ -24,7 +25,7 @@ const Button = React.createClass({
2425 * @type {("button"|"reset"|"submit") }
2526 * @defaultValue 'button'
2627 */
27- type : React . PropTypes . oneOf ( ButtonInput . types )
28+ type : React . PropTypes . oneOf ( types )
2829 } ,
2930
3031 getDefaultProps ( ) {
@@ -101,4 +102,6 @@ const Button = React.createClass({
101102 }
102103} ) ;
103104
105+ Button . types = types ;
106+
104107export default Button ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class ButtonInput extends InputBase {
1717 }
1818}
1919
20- ButtonInput . types = [ 'button' , 'reset' , 'submit' ] ;
20+ ButtonInput . types = Button . types ;
2121
2222ButtonInput . defaultProps = {
2323 type : 'button'
You can’t perform that action at this time.
0 commit comments