import * as React from "react"; import { RootState, ToolType } from "../../state"; import { Dispatch } from "redux"; import { componentPickerBackgroundClick } from "../../actions"; import { BaseModalProps } from "./modal.pc"; export type Props = { root: RootState; dispatch: Dispatch; }; export default (Base: React.ComponentClass) => class ModalController extends React.PureComponent { onBackgroundClick = () => { this.props.dispatch(componentPickerBackgroundClick()); }; render() { const { root, dispatch } = this.props; const { onBackgroundClick } = this; // if (root.toolType === ToolType.COMPONENT && !root.selectedComponentId) { // return ( // // ); // } return null; } };