import { StyledLabel, StyledRadio } from './styled-radio';
import * as React from 'react';

interface Props {
    label: string;
    name: string;
    checked: boolean;
    onChange: () => void;
}

const Radio = (props: Props) => (
    <div>
        <StyledRadio
            type='radio'
            checked={props.checked}
            name={props.name}
            onChange={props.onChange}
        />
        <StyledLabel
            htmlFor={props.name}
        >
            {props.label}
        </StyledLabel>
    </div>
)

export default Radio;
