Skip to content

Commit

Permalink
[removed] Input type=submit deprecation warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
aabenoja committed May 26, 2015
1 parent 93c95b6 commit ce5b436
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
6 changes: 1 addition & 5 deletions src/Input.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import React from 'react';
import InputBase from './InputBase';
import ButtonInput from './ButtonInput';
import FormControls from './FormControls';
import deprecationWarning from './utils/deprecationWarning';

class Input extends InputBase {
render() {
if (ButtonInput.types.indexOf(this.props.type) > -1) {
deprecationWarning(`Input type=${this.props.type}`, 'ButtonInput');
return <ButtonInput {...this.props} />;
} else if (this.props.type === 'static') {
if (this.props.type === 'static') {
deprecationWarning('Input type=static', 'StaticText');
return <FormControls.Static {...this.props} />;
}
Expand Down
24 changes: 0 additions & 24 deletions test/InputSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,30 +41,6 @@ describe('Input', function () {
assert.equal(instance.getValue(), 'v');
});

it('throws a deprecation warning on type=button', function () {
ReactTestUtils.renderIntoDocument(
<Input type="button" />
);

shouldWarn('deprecated');
});

it('throws a deprecation warning on type=reset', function () {
ReactTestUtils.renderIntoDocument(
<Input type="reset" />
);

shouldWarn('deprecated');
});

it('throws a deprecation warning on type=submit', function () {
ReactTestUtils.renderIntoDocument(
<Input type="submit" />
);

shouldWarn('deprecated');
});

it('throws a warning when type=static', function () {
ReactTestUtils.renderIntoDocument(
<Input type="static" value="v" />
Expand Down

0 comments on commit ce5b436

Please sign in to comment.