import React from 'react';

import { storiesOf } from '@storybook/react';
import { withKnobs, text, date } from '@storybook/addon-knobs';

import EventTime from './index';

var startTime = new Date('March 15, 2002 03:00:00');
var endTime = new Date('March 15, 2002 12:00:00');

storiesOf('atoms/contact', module).addDecorator(withKnobs({ escapeHTML: false })).add('EventTime', function () {
  var props = {
    startDate: date('startDate', startTime),
    endDate: date('endDate', endTime),
    details: text('details', 'First come first serve.')
  };
  return React.createElement(EventTime, props);
});