bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/lock-viewers/context/withContext.jsx
2019-05-23 13:47:56 -03:00

20 lines
419 B
JavaScript

import React from 'react';
import LockProvider from './provider';
import LockConsumer from './consumer';
const withProvider = Component => props => (
<LockProvider {...props}>
<Component />
</LockProvider>
);
const withConsumer = Component => LockConsumer(Component);
const withLockContext = Component => withProvider(withConsumer(Component));
export {
withProvider,
withConsumer,
withLockContext,
};