import React from 'react' ; import { storiesOf } from '@storybook/react' ; import { SerializableRecord } from '@kbn/utility-types' ; import { Demo , dashboardFactory , urlFactory } from './test_data' ; import { ActionFactory , BaseActionFactoryContext } from '../../dynamic_actions' ; const dashboard = dashboardFactory as unknown as ActionFactory < SerializableRecord , object , BaseActionFactoryContext > ; const url = urlFactory as unknown as ActionFactory < SerializableRecord , object , BaseActionFactoryContext > ; storiesOf ( 'components/ActionWizard' , module ) . add ( 'default' , ( ) => < Demo actionFactories = { [ dashboard , url ] } / > ) . add ( 'Only one factory is available' , ( ) => ( < Demo actionFactories = { [ dashboard ] } / > ) ) . add ( 'Long list of action factories' , ( ) => ( < Demo actionFactories = { [ dashboard , url , dashboard , url , dashboard , url , dashboard , url ] } / > ) ) ;