Input uses CommonJS modules

This commit is contained in:
NikolaBorislavovHristov 2019-04-17 15:18:46 +03:00
parent f8371bd44c
commit e76eb8a09f
2 changed files with 7 additions and 7 deletions

View file

@ -1,6 +1,6 @@
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import { withFocusable } from 'stremio-common';
const React = require('react');
const PropTypes = require('prop-types');
const withFocusable = require('../Focusable/withFocusable');
const ENTER_KEY_CODE = 13;
const BUTTON_INPUT_TYPES = ['button', 'link', 'submit', 'checkbox'];
@ -16,7 +16,7 @@ const TAG_NAMES_FOR_TYPE = {
search: 'input'
};
class Input extends PureComponent {
class Input extends React.PureComponent {
onKeyUp = (event) => {
if (typeof this.props.onKeyUp === 'function') {
this.props.onKeyUp(event);
@ -87,4 +87,4 @@ const InputWithForwardedRef = React.forwardRef((props, ref) => (
InputWithForwardedRef.displayName = 'InputWithForwardedRef';
export default InputWithForwardedRef;
module.exports = InputWithForwardedRef;

View file

@ -1,3 +1,3 @@
import Input from './Input';
const Input = require('./Input');
export default Input;
module.exports = Input;