import React from 'react';
import ReactDOM from 'react-dom'
import Checkbox from './Checkbox'


class CheckboxList extends React.Component {

	constructor(props) {
		super(props);
		this.ageRange = ["3~5", "5~8", "8~12", "12~16", "16+"];
	}



	render(){

		var sortList = this.ageRange.map(function(arr, index){
			return (
					<li className="sortDetail" key={index}>
						<Checkbox idx={index} forAge={arr} checkedList={this.props.checkedList} handleChange={this.props.handleChange} />
						<label htmlFor={arr} >{arr}</label>
					</li>
				);
			},this);

		return (
			<ul>
				{sortList}
			</ul>
		);
	}

}

export default CheckboxList;


