diff --git a/src/Button.js b/src/Button.js index ed41f5a68e..940cf9d57c 100644 --- a/src/Button.js +++ b/src/Button.js @@ -2,7 +2,8 @@ import React from 'react'; import classNames from 'classnames'; import BootstrapMixin from './BootstrapMixin'; import elementType from 'react-prop-types/lib/elementType'; -import ButtonInput from './ButtonInput'; + +const types = ['button', 'reset', 'submit']; const Button = React.createClass({ mixins: [BootstrapMixin], @@ -24,7 +25,7 @@ const Button = React.createClass({ * @type {("button"|"reset"|"submit")} * @defaultValue 'button' */ - type: React.PropTypes.oneOf(ButtonInput.types) + type: React.PropTypes.oneOf(types) }, getDefaultProps() { @@ -101,4 +102,6 @@ const Button = React.createClass({ } }); +Button.types = types; + export default Button; diff --git a/src/ButtonInput.js b/src/ButtonInput.js index c323c83bab..0ad24a09e1 100644 --- a/src/ButtonInput.js +++ b/src/ButtonInput.js @@ -17,7 +17,7 @@ class ButtonInput extends InputBase { } } -ButtonInput.types = ['button', 'reset', 'submit']; +ButtonInput.types = Button.types; ButtonInput.defaultProps = { type: 'button'