Files
superset2/superset/assets/javascripts/explorev2/components/FieldSetRow.jsx
Maxime Beauchemin 222671675c [exploreV2] mapStateToProps for fields (#1882)
* Controls support for mapStateToProps

* Binding methods in the constructor

* Adressing comments

* Fixing tests
2017-01-06 12:38:44 -08:00

24 lines
508 B
JavaScript

import React, { PropTypes } from 'react';
const NUM_COLUMNS = 12;
const propTypes = {
fields: PropTypes.arrayOf(PropTypes.object).isRequired,
};
function FieldSetRow(props) {
const colSize = NUM_COLUMNS / props.fields.length;
return (
<div className="row space-2">
{props.fields.map((field, i) => (
<div className={`col-lg-${colSize} col-xs-12`} key={i} >
{field}
</div>
))}
</div>
);
}
FieldSetRow.propTypes = propTypes;
export default FieldSetRow;