import React from 'react';
import PropTable from './components/propTable';
import { storiesOf } from '@storybook/react';
import { withInfo } from '@storybook/addon-info';
import { withKnobs, boolean, select } from '@storybook/addon-knobs/react';
import { Store, State } from '@sambego/storybook-state';
import { RadioGroup, RadioButton } from '../components';

const sizes = ['small', 'medium', 'large'];
const values = ['Option one', 'Option two', 'Option three'];

const store = new Store({
  value: 'Option one',
});
const updateState = value => {
  store.set({ value });
};

storiesOf('Radio', module)
  .addDecorator((story, context) => withInfo({ TableComponent: PropTable })(story)(context))
  .addDecorator(withKnobs)
  .add('Basic', () => (
    <State store={store}>
      <RadioGroup name="stringValue" onChange={updateState}>
        {values.map((value, key) => (
          <RadioButton
            key={key}
            size={select('Size', sizes, 'medium')}
            marginVertical={3}
            label={value}
            value={value}
            disabled={boolean('Disabled', false)}
          />
        ))}
      </RadioGroup>
    </State>
  ));

@@ -31,164 +31,55 @@
 ort 
-PropTable from './components/propTable';%0Aimport %7B storiesOf %7D from '@storybook/react';%0Aimport %7B withInfo %7D from '@storybook/addon-info';%0Aimport %7B withKnobs,
+%7B storiesOf %7D from '@storybook/react';%0Aimport %7B
  boo
@@ -500,120 +500,77 @@
 .add
-Decorator((story, context) =%3E withInfo(%7B TableComponent: PropTable %7D)(story)(context))%0A  .addDecorator(withKnobs
+Parameters(%7B%0A    info: %7B%0A      propTablesExclude: %5BState%5D,%0A    %7D,%0A  %7D
 )%0A  

update story