import { Meta , Story } from '@storybook/react' ; import { PrimaryButton } from '../buttons' ; import { Modal } from './Modal' ; import React from 'react' ; interface IProps { title ? : string ; actions : JSX . Element [ ] ; show : boolean ; handleClose ? : ( ) => void ; className ? : string ; } const Template = ( args ) => < Modal { ... args } / > ; export const ModalView = Template . bind ( { } ) ; ModalView . args = { title : 'Modal' , show : true , actions : [ < PrimaryButton key = "submit" onClick = { ( ) => { alert ( 'Submit clicked' ) ; } } > Submit < /PrimaryButton>, < button key = "preview" onClick = { ( ) => { alert ( 'Preview clicked' ) ; } } > Preview < /button> ] , handleClose : ( ) => alert ( 'closed' ) , className : 'Modal view' } ; export default { title : 'Components/Interface/Modal' , component : Modal } as Meta ;