import * as React from 'react'
import { Column, Icon } from '../web'
import { RadioButtonProps, RadioOption } from '../interfaces'

const styles = require('../../src/styles/components/radio.scss')

export class RadioButton extends React.Component<RadioButtonProps, any> {

    public render() {
        return (
            <Column align="center" className={styles.option}>
                <input
                    checked={this.props.isSelected}
                    className={styles.radio}
                    type="radio"
                    name={this.props.name}
                    value={this.props.value}
                    onChange={this.props.onChange}
                />
                <Icon icon={this.props.img} fill="primary" className={styles.icon} size={34} />
                <label className={styles.label} htmlFor={this.props.name}>{this.props.label}</label>
            </Column>

        )
    }
}
