12 lines
259 B
JavaScript
12 lines
259 B
JavaScript
import React from 'react';
|
|
import lockContext from './context';
|
|
|
|
|
|
const contextConsumer = Component => props => (
|
|
<lockContext.Consumer>
|
|
{ contexts => <Component {...props} {...contexts} />}
|
|
</lockContext.Consumer>
|
|
);
|
|
|
|
export default contextConsumer;
|