mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-27 09:33:05 +00:00
Input uses CommonJS modules
This commit is contained in:
parent
f8371bd44c
commit
e76eb8a09f
2 changed files with 7 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { PureComponent } from 'react';
|
const React = require('react');
|
||||||
import PropTypes from 'prop-types';
|
const PropTypes = require('prop-types');
|
||||||
import { withFocusable } from 'stremio-common';
|
const withFocusable = require('../Focusable/withFocusable');
|
||||||
|
|
||||||
const ENTER_KEY_CODE = 13;
|
const ENTER_KEY_CODE = 13;
|
||||||
const BUTTON_INPUT_TYPES = ['button', 'link', 'submit', 'checkbox'];
|
const BUTTON_INPUT_TYPES = ['button', 'link', 'submit', 'checkbox'];
|
||||||
|
|
@ -16,7 +16,7 @@ const TAG_NAMES_FOR_TYPE = {
|
||||||
search: 'input'
|
search: 'input'
|
||||||
};
|
};
|
||||||
|
|
||||||
class Input extends PureComponent {
|
class Input extends React.PureComponent {
|
||||||
onKeyUp = (event) => {
|
onKeyUp = (event) => {
|
||||||
if (typeof this.props.onKeyUp === 'function') {
|
if (typeof this.props.onKeyUp === 'function') {
|
||||||
this.props.onKeyUp(event);
|
this.props.onKeyUp(event);
|
||||||
|
|
@ -87,4 +87,4 @@ const InputWithForwardedRef = React.forwardRef((props, ref) => (
|
||||||
|
|
||||||
InputWithForwardedRef.displayName = 'InputWithForwardedRef';
|
InputWithForwardedRef.displayName = 'InputWithForwardedRef';
|
||||||
|
|
||||||
export default InputWithForwardedRef;
|
module.exports = InputWithForwardedRef;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
import Input from './Input';
|
const Input = require('./Input');
|
||||||
|
|
||||||
export default Input;
|
module.exports = Input;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue