All files / javascripts/explorev2/components ControlPanelsContainer.jsx

0% Statements 0/11
100% Branches 0/0
0% Functions 0/3
0% Lines 0/11
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41                                                                                 
import React from 'react';
import { connect } from 'react-redux';
import { Panel } from 'react-bootstrap';
import { DefaultControls, VIZ_CONTROL_MAPPING } from '../constants';
 
const propTypes = {
  vizType: React.PropTypes.string,
};
 
const defaultProps = {
  vizType: null,
};
 
function ControlPanelsContainer(props) {
  return (
    <Panel>
      <div className="scrollbar-container">
        <div className="scrollbar-content">
          {DefaultControls}
          {VIZ_CONTROL_MAPPING[props.vizType]}
        </div>
      </div>
    </Panel>
  );
}
 
ControlPanelsContainer.propTypes = propTypes;
ControlPanelsContainer.defaultProps = defaultProps;
 
function mapStateToProps(state) {
  return {
    vizType: state.viz.formData.vizType,
  };
}
 
function mapDispatchToProps() {
  return {};
}
 
export default connect(mapStateToProps, mapDispatchToProps)(ControlPanelsContainer);