diff --git a/src/common/TextInput/TextInput.js b/src/common/Input/Input.js similarity index 50% rename from src/common/TextInput/TextInput.js rename to src/common/Input/Input.js index 1c1bed044..1766e975d 100644 --- a/src/common/TextInput/TextInput.js +++ b/src/common/Input/Input.js @@ -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) => ( - +const InputWithForwardedRef = React.forwardRef((props, ref) => ( + )); -TextInputWithForwardedRef.displayName = 'TextInputWithForwardedRef'; +InputWithForwardedRef.displayName = 'InputWithForwardedRef'; -export default TextInputWithForwardedRef; +export default InputWithForwardedRef; diff --git a/src/common/Input/index.js b/src/common/Input/index.js new file mode 100644 index 000000000..a122bd4be --- /dev/null +++ b/src/common/Input/index.js @@ -0,0 +1,3 @@ +import Input from './Input'; + +export default Input; diff --git a/src/common/TextInput/index.js b/src/common/TextInput/index.js deleted file mode 100644 index a93ada305..000000000 --- a/src/common/TextInput/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import TextInput from './TextInput'; - -export default TextInput;