@visactor/openinula-vchart
Version:
The openinula version of VChart 4.x
24 lines (19 loc) • 847 B
JavaScript
;
var __importDefault = this && this.__importDefault || function(mod) {
return mod && mod.__esModule ? mod : {
default: mod
};
};
Object.defineProperty(exports, "__esModule", {
value: !0
}), exports.withStage = void 0;
const openinula_1 = __importDefault(require("openinula")), StageContext = openinula_1.default.createContext(null);
function withStage(Component) {
const Com = openinula_1.default.forwardRef(((props, ref) => openinula_1.default.createElement(StageContext.Consumer, null, (ctx => openinula_1.default.createElement(Component, Object.assign({
ref: ref,
stage: ctx
}, props))))));
return Com.displayName = Component.name, Com;
}
StageContext.displayName = "StageContext", exports.withStage = withStage, exports.default = StageContext;
//# sourceMappingURL=stage.js.map