import * as React from "react"; import { Dispatch } from "redux"; import * as cx from "classnames"; import { BaseQueryOptionsProps } from "./view.pc"; import { PCQueryType, PCQuery, PCVariableQuery, PCVariable, PCMediaQuery } from "paperclip"; import { QUERY_DROPDOWN_OPTIONS } from "./utils"; import { queryTypeChanged } from "../../../../../actions"; export type Props = { query: PCQuery; dispatch: Dispatch; globalVariables: PCVariable[]; }; export default (Base: React.ComponentClass) => class QueryOptionsController extends React.PureComponent { onTypeChange = (value: PCQueryType) => { this.props.dispatch(queryTypeChanged(this.props.query, value)); }; render() { const { onTypeChange } = this; const { query, dispatch, globalVariables, ...rest } = this.props; return ( ); } };