import React from 'react';
import { mount } from 'enzyme';
import { expect } from 'chai';
import { describe, it, specs } from '../../storybook/facade';
import ChartLegend from './index';

export default (stories) => {
	stories.add('ChartLegend', () => {
		const items = [
			{
				title: 'Current',
				color: '#0099CC'
			},
			{
				title: 'Prior',
				color: '#FF9900'
			},
			{
				title: 'Organization Average',
				color: '#99A4AC'
			}
		];

		const component = (
			<div style={{ background: '#FFF' }}>
				<ChartLegend
					centered
					items={items}
				/>
			</div>
		);

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

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

		return component;
	});
};
