Sha256: 5c458b0287db0185d2d565b498e90dc77c27aae85301261ce9e354956de62d30
Contents?: true
Size: 1.36 KB
Versions: 51
Compression:
Stored size: 1.36 KB
Contents
import React from 'react'; import { object, select, action } from '@theforeman/stories'; import { TASKS_DASHBOARD_AVAILABLE_TIMES, TASKS_DASHBOARD_AVAILABLE_QUERY_STATES, TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS, TASKS_DASHBOARD_AVAILABLE_QUERY_MODES, } from '../../TasksDashboardConstants'; import { MOCKED_DATA } from './TasksCardsGrid.fixtures'; import TasksCardsGrid from './TasksCardsGrid'; export default { title: 'TasksDashboard/TasksCardsGrid/TasksCardsGrid', component: TasksCardsGrid, }; const createSelect = (name, options) => select(name, { ...options, NONE: 'none' }, 'none'); export const Basic = () => { const selectTime = select( 'time', TASKS_DASHBOARD_AVAILABLE_TIMES, TasksCardsGrid.defaultProps.time ); const selectState = createSelect( 'query.state', TASKS_DASHBOARD_AVAILABLE_QUERY_STATES ); const selectResult = createSelect( 'query.result', TASKS_DASHBOARD_AVAILABLE_QUERY_RESULTS ); const selectMode = createSelect( 'query.mode', TASKS_DASHBOARD_AVAILABLE_QUERY_MODES ); return ( <div> <TasksCardsGrid time={selectTime} query={{ state: selectState, result: selectResult, mode: selectMode, time: selectTime, }} data={object('data', MOCKED_DATA)} updateQuery={action('updateQuery')} /> </div> ); };
Version data entries
51 entries across 51 versions & 1 rubygems