Skip to content

Commit

Permalink
Merge pull request react-bootstrap#1429 from michaeljones/buttons
Browse files Browse the repository at this point in the history
Remove cross import between Button & ButtonInput
  • Loading branch information
taion committed Oct 21, 2015
2 parents f9bcac1 + 6e37b27 commit d2bcc8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -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() {
Expand Down Expand Up @@ -101,4 +102,6 @@ const Button = React.createClass({
}
});

Button.types = types;

export default Button;
2 changes: 1 addition & 1 deletion src/ButtonInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ButtonInput extends InputBase {
}
}

ButtonInput.types = ['button', 'reset', 'submit'];
ButtonInput.types = Button.types;

ButtonInput.defaultProps = {
type: 'button'
Expand Down

0 comments on commit d2bcc8e

Please sign in to comment.