import React, { useState }           from 'react';
import { text, withKnobs }                  from '@storybook/addon-knobs';
import { Checkbox, Switch, Wrapper, Radio } from '../../..';

export default {
    title:      'GEENEE-UI/Form',
    component:  Radio,
    decorators: [ withKnobs ]
};

export const _Radio = () => {
    const [ checked, setChecked ] = useState(false);
    const handleClick = (value: boolean) => {
        setChecked(value);
    };
    return (
        <Wrapper>
            <Checkbox
                checked={ checked }
                onChange={ handleClick }
                defaultChecked={ false }
                label={ text('Label', 'Label text') }
            />
        </Wrapper>
    );
};
