import { RadioButton } from 'material-ui/RadioButton';
import React from 'react';
import { DropDown } from '../../formElements';

export default  class RadioWithSelect extends React.Component {
    render() {
    	var data = this.props.data;
    	var radioData = data.radioButton;
    	var selectData = data.selectData;
        return (
            <div>
				<RadioButton className="half_width" type='RadioGroup' 
					label={radioData.label}
					style={{padding: '4px 0'}}
					onCheck={(e)=>{radioData.onChange(e)}}
					name={radioData.name}
					checked={radioData.selected}
				/>
				<DropDown
					className="half_width form-field"
					name="selectData.name"
					items={selectData.data}
					onChange={(val)=>{selectData.onChange(val)}}
					placeholder={selectData.placeholder}
					disabled={selectData.disabled}
					value={selectData.value}
				/>
            </div>
        );
    };
}