mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 21:27:05 +00:00
12 lines
342 B
JavaScript
12 lines
342 B
JavaScript
const React = require('react');
|
|
const FocusableContext = require('./FocusableContext');
|
|
|
|
const withFocusable = (Component) => {
|
|
return (props) => (
|
|
<FocusableContext.Consumer>
|
|
{focusable => <Component {...props} focusable={focusable} />}
|
|
</FocusableContext.Consumer>
|
|
);
|
|
};
|
|
|
|
module.exports = withFocusable;
|