import React from 'react'; import { storiesOf } from '@storybook/react'; import { withKnobs, number, select } from '@storybook/addon-knobs'; import { action } from '@storybook/addon-actions'; import { withCardsDecorator } from '../../../../../../../stories/decorators'; import { TASKS_DASHBOARD_AVAILABLE_TIMES, TASKS_DASHBOARD_AVAILABLE_QUERY_STATES, TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS, TASKS_DASHBOARD_AVAILABLE_QUERY_MODES, } from '../../../../TasksDashboardConstants'; import StoppedTasksCard from './StoppedTasksCard'; storiesOf('TasksDashboard/TasksCardsGrid', module) .addDecorator(withKnobs) .addDecorator(withCardsDecorator) .add('StoppedTasksCard', () => { const selectTime = select( 'time', TASKS_DASHBOARD_AVAILABLE_TIMES, StoppedTasksCard.defaultProps.time ); const selectState = select( 'query.state', { ...TASKS_DASHBOARD_AVAILABLE_QUERY_STATES, NONE: null }, TASKS_DASHBOARD_AVAILABLE_QUERY_STATES.STOPPED ); const selectResult = select( 'query.result', { ...TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS, NONE: null }, null ); const selectMode = select( 'query.mode', { ...TASKS_DASHBOARD_AVAILABLE_QUERY_MODES, NONE: null }, null ); return (