import * as React from "react"; import * as cx from "classnames"; import { InspectorNode } from "paperclip"; import { BaseLabeledCssInputProps } from "./view.pc"; import { Dispatch } from "redux"; import { cssInheritedFromLabelClicked } from "../../../../../../../../actions"; export type Props = { inheritedFromNode?: InspectorNode; dispatch: Dispatch; }; export default (Base: React.ComponentClass) => class LabeledCSSInputController extends React.PureComponent { onLabelClick = () => { if (this.props.inheritedFromNode) { this.props.dispatch( cssInheritedFromLabelClicked(this.props.inheritedFromNode) ); } }; render() { const { onLabelClick } = this; const { inheritedFromNode, ...rest } = this.props; return ( ); } };