import React from 'react';
import { withKnobs, boolean } from '@storybook/addon-knobs';
import { mount } from 'enzyme';
import { expect } from 'chai';
import { describe, it, specs } from '../../storybook/facade';
import Loader from './index';

export default (stories) => {
	stories.addDecorator(withKnobs);

	stories.add('Loader', () => {
		const active = boolean('Active', true);

		const component = (
			<Loader
				active={active}
			>
				Content Goes Here
			</Loader>
		);

		specs(() => describe('Loader', () => {
			const wrapper = mount(component);

			it('Should be ok', () => {
				expect(wrapper).be.ok;
			});
		}));

		return component;
	});
};
