tandem-front-end
Version:
Visual editor for web components
26 lines • 997 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var React = require("react");
var recompose_1 = require("recompose");
var state_1 = require("state");
var actions_1 = require("actions");
exports.default = recompose_1.compose(recompose_1.pure, recompose_1.withHandlers({
onBackgroundClick: function (_a) {
var dispatch = _a.dispatch;
return function () {
dispatch(actions_1.componentPickerBackgroundClick());
};
}
}), function (Base) { return function (_a) {
var onBackgroundClick = _a.onBackgroundClick, root = _a.root, dispatch = _a.dispatch;
if (root.toolType === state_1.ToolType.COMPONENT && !root.selectedComponentId) {
return (React.createElement(Base, { backgroundProps: {
onClick: onBackgroundClick
}, pickerProps: {
root: root,
dispatch: dispatch
} }));
}
return null;
}; });
//# sourceMappingURL=modal-controller.js.map