2019-05-24 00:47:56 +08:00
|
|
|
import React from 'react';
|
|
|
|
import lockContext from './context';
|
|
|
|
|
|
|
|
|
2019-05-25 02:09:09 +08:00
|
|
|
const contextConsumer = Component => props => (
|
2019-05-24 00:47:56 +08:00
|
|
|
<lockContext.Consumer>
|
|
|
|
{ contexts => <Component {...props} {...contexts} />}
|
|
|
|
</lockContext.Consumer>
|
|
|
|
);
|
|
|
|
|
2019-05-25 02:09:09 +08:00
|
|
|
export default contextConsumer;
|