/* eslint-disable import/first */ import React, { Fragment, useState } from 'react'; import { storiesOf } from '@storybook/react'; import colorVariables from '../../variables/colors.json'; import { Checkbox } from '..'; function State({ initialState, hide, children }) { const [state, setState] = useState(initialState); return ( {children(state, setState)} {!hide ? (

State:
            {JSON.stringify(state, null, 2)}
          
) : null}
) } storiesOf('Checkbox', module) .add('Default', () => ( {(state, setState) => ( setState(e.target.checked)} /> )} )) .add('Disabled State', () => ( {}} />
{}} />
)) .add('Custom Colored Checkbox', () => ( {(state, setState) => ( setState(e.target.checked)} /> )} ))