import { GeneralStepper as GeneralStepperComponent , StepperProps } from './GeneralStepper' ; const ExampleButtonComponent = ( { onComplete , onCompleteText } ) => ( < > < button onClick = { ( ) => onComplete ( onCompleteText ) } > Click Me < /button> < />); const ExampleButtonFinalComponent = ( { onComplete , onCompleteText , resetFlow , completeButtonText } ) => ( < > < button onClick = { ( ) => onComplete ( onCompleteText ) } > Click Me < /button> < button onClick = { ( ) => resetFlow ( ) } > { completeButtonText } < /button> < />); const functionTest = ( _ , cb ) => { cb ( ) ; } ; export default { title : 'Molecules/GeneralStepper' , component : GeneralStepperComponent } ; const Template = ( args ) => < GeneralStepperComponent { ... args } / > ; export const GeneralStepper = Template . bind ( { } ) ; GeneralStepper . args = { steps : [ { label : 'Test Component 1' , component : ExampleButtonComponent , props : { onCompleteText : 'Finished this1' } , actions : ( payload , cb ) => functionTest ( payload , cb ) } , { label : 'Test Component 2' , component : ExampleButtonFinalComponent , props : { onCompleteText : 'Finished this2' } } ] , defaultBackPath : '/dashboard' , defaultBackPathLabel : 'Dashboard' , completeBtnText : 'Finished' } ;