import React from 'react' import PropTypes from 'prop-types' import DocLabel from './DocLabel' import Button from '../Button' import FunctionIcon from 'react-icons/lib/md/functions' import MdInsertChart from 'react-icons/lib/md/insert-chart' export default class FunctionButtons extends React.Component { static propTypes = { fieldSpec: PropTypes.object, onZoomClick: PropTypes.func, onDataClick: PropTypes.func, } render() { let makeZoomButton, makeDataButton if (this.props.fieldSpec['zoom-function']) { makeZoomButton = if (this.props.fieldSpec['property-function'] && ['piecewise-constant', 'interpolated'].indexOf(this.props.fieldSpec['function']) !== -1) { makeDataButton = } return
{makeDataButton}{makeZoomButton}
} else { return null } } }