mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-08-16 15:44:49 +00:00
use object with empty prototype chain for tag names
This commit is contained in:
parent
9d4fd268ae
commit
7698c4351a
1 changed files with 2 additions and 2 deletions
|
|
@ -5,14 +5,14 @@ const { useFocusable } = require('../FocusableContext');
|
|||
const ENTER_KEY_CODE = 13;
|
||||
const BUTTON_INPUT_TYPES = ['button', 'link', 'checkbox'];
|
||||
const TEXT_INPUT_TYPES = ['text', 'email', 'password'];
|
||||
const TAG_NAMES_FOR_TYPE = {
|
||||
const TAG_NAMES_FOR_TYPE = Object.assign(Object.create(null), {
|
||||
button: 'div',
|
||||
link: 'a',
|
||||
checkbox: 'input',
|
||||
text: 'input',
|
||||
email: 'input',
|
||||
password: 'input'
|
||||
};
|
||||
});
|
||||
|
||||
const Input = React.forwardRef(({ type, tabIndex, children, ...props }, ref) => {
|
||||
const focusable = useFocusable();
|
||||
|
|
|
|||
Loading…
Reference in a new issue