all files / src/explore/components/ ControlRow.jsx

100% Statements 10/10
100% Branches 0/0
100% Functions 2/2
100% Lines 10/10
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                              
import React from 'react';
import PropTypes from 'prop-types';
 
const NUM_COLUMNS = 12;
 
const propTypes = {
  controls: PropTypes.arrayOf(PropTypes.object).isRequired,
};
 
function ControlSetRow(props) {
  const colSize = NUM_COLUMNS / props.controls.length;
  return (
    <div className="row space-1">
      {props.controls.map((control, i) => (
        <div className={`col-lg-${colSize} col-xs-12`} key={i} >
          {control}
        </div>
      ))}
    </div>
  );
}
 
ControlSetRow.propTypes = propTypes;
export default ControlSetRow;