TextInput renamed to Input

This commit is contained in:
svetlagasheva 2019-01-29 18:00:24 +02:00
parent 552de0bd49
commit 09c30a8101
3 changed files with 12 additions and 12 deletions

View file

@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { withFocusable } from 'stremio-common';
class TextInput extends PureComponent {
class Input extends PureComponent {
render() {
const { forwardedRef, focusable, ...props } = this.props;
return (
@ -15,21 +15,21 @@ class TextInput extends PureComponent {
}
}
TextInput.propTypes = {
Input.propTypes = {
focusable: PropTypes.bool.isRequired
};
TextInput.defaultProps = {
Input.defaultProps = {
focusable: false
};
const TextInputWithFocusable = withFocusable(TextInput);
const InputWithFocusable = withFocusable(Input);
TextInputWithFocusable.displayName = 'TextInputWithFocusable';
InputWithFocusable.displayName = 'InputWithFocusable';
const TextInputWithForwardedRef = React.forwardRef((props, ref) => (
<TextInputWithFocusable {...props} forwardedRef={ref} />
const InputWithForwardedRef = React.forwardRef((props, ref) => (
<InputWithFocusable {...props} forwardedRef={ref} />
));
TextInputWithForwardedRef.displayName = 'TextInputWithForwardedRef';
InputWithForwardedRef.displayName = 'InputWithForwardedRef';
export default TextInputWithForwardedRef;
export default InputWithForwardedRef;

View file

@ -0,0 +1,3 @@
import Input from './Input';
export default Input;

View file

@ -1,3 +0,0 @@
import TextInput from './TextInput';
export default TextInput;