mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
TextInput renamed to Input
This commit is contained in:
parent
552de0bd49
commit
09c30a8101
3 changed files with 12 additions and 12 deletions
|
|
@ -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;
|
||||
3
src/common/Input/index.js
Normal file
3
src/common/Input/index.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import Input from './Input';
|
||||
|
||||
export default Input;
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
import TextInput from './TextInput';
|
||||
|
||||
export default TextInput;
|
||||
Loading…
Reference in a new issue