File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React from 'react';
2
2
import classNames from 'classnames' ;
3
3
import BootstrapMixin from './BootstrapMixin' ;
4
4
import CustomPropTypes from './utils/CustomPropTypes' ;
5
+ import ButtonInput from './ButtonInput' ;
5
6
6
7
const Button = React . createClass ( {
7
8
mixins : [ BootstrapMixin ] ,
@@ -14,14 +15,18 @@ const Button = React.createClass({
14
15
navDropdown : React . PropTypes . bool ,
15
16
componentClass : CustomPropTypes . elementType ,
16
17
href : React . PropTypes . string ,
17
- target : React . PropTypes . string
18
+ target : React . PropTypes . string ,
19
+ /**
20
+ * Defines HTML button type Attribute
21
+ * @type {("button"|"reset"|"submit") }
22
+ */
23
+ type : React . PropTypes . oneOf ( ButtonInput . types )
18
24
} ,
19
25
20
26
getDefaultProps ( ) {
21
27
return {
22
28
bsClass : 'button' ,
23
- bsStyle : 'default' ,
24
- type : 'button'
29
+ bsStyle : 'default'
25
30
} ;
26
31
} ,
27
32
@@ -68,6 +73,7 @@ const Button = React.createClass({
68
73
return (
69
74
< Component
70
75
{ ...this . props }
76
+ type = { this . props . type || 'button' }
71
77
className = { classNames ( this . props . className , classes ) } >
72
78
{ this . props . children }
73
79
</ Component >
You can’t perform that action at this time.
0 commit comments