import React from 'react';
import Modularity from 'modularity-front';
//import CardImg from './card.jpg';

import './HorizontalContainer.css';

let Module = Modularity.Module;



class HorizontalContainer extends Modularity.Module {
	constructor(props) {
		super(props);
	}

	render() {
		return(
			<div className={'HorizontalContainer ' + this.props.className}>
				{this.props.children.map((child, indx) => {
					return <div className="HorizontalItem" style={{flex: this.Grow.value[indx]}} key={indx + this.getId()}>
						{child}
					</div>;
				})}
				{super.render(false)}
			</div>
			);
				    
	}
}


HorizontalContainer.Inputs = {
	Grow: {
		type: Module.Types.Array,
		arrType: Module.Types.Number,
		defaultValue: [1,11]
	}
}

HorizontalContainer.Category = "Nikatlas";
export default HorizontalContainer;