UNPKG

@visactor/openinula-vchart

Version:

The openinula version of VChart 4.x

16 lines (12 loc) 490 B
import React from "openinula"; const StageContext = React.createContext(null); StageContext.displayName = "StageContext"; export function withStage(Component) { const Com = React.forwardRef(((props, ref) => React.createElement(StageContext.Consumer, null, (ctx => React.createElement(Component, Object.assign({ ref: ref, stage: ctx }, props)))))); return Com.displayName = Component.name, Com; } export default StageContext; //# sourceMappingURL=stage.js.map