Sha256: 12b3899585a38619b8ce7fe6c770a220c98a93c658c4b07fd95e97b4b72f0029
Contents?: true
Size: 1.44 KB
Versions: 22
Compression:
Stored size: 1.44 KB
Contents
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_QUERY_MODES, TASKS_DASHBOARD_AVAILABLE_TIMES, TASKS_DASHBOARD_AVAILABLE_QUERY_STATES, } from '../../../../TasksDashboardConstants'; import PausedTasksCard from './PausedTasksCard'; storiesOf('TasksDashboard/TasksCardsGrid', module) .addDecorator(withKnobs) .addDecorator(withCardsDecorator) .add('PausedTasksCard', () => { const selectTime = select( 'time', TASKS_DASHBOARD_AVAILABLE_TIMES, PausedTasksCard.defaultProps.time ); const selectMode = select( 'mode', { ...TASKS_DASHBOARD_AVAILABLE_QUERY_MODES, NONE: 'none', TOTAL: null }, 'none' ); return ( <PausedTasksCard data={{ last: number('data.last', 3), older: number('data.older', 5), }} time={selectTime} query={{ state: select( 'query.state', { ...TASKS_DASHBOARD_AVAILABLE_QUERY_STATES, NONE: null, }, TASKS_DASHBOARD_AVAILABLE_QUERY_STATES.PAUSED ), mode: selectMode, time: selectTime, }} updateQuery={action('updateQuery')} /> ); });
Version data entries
22 entries across 22 versions & 1 rubygems