import React from 'react' ; import { Meta , Story } from '@storybook/react' ; import { ArrowForward } from '../icons' ; import { ImageUploader } from './ImageUploader' ; export default { title : 'Components/forms/ImageUploader' , component : ImageUploader } as Meta ; interface IImagePickerProps { id : string ; title : string ; icon ? : ( ) => React . ReactNode ; handleFileChange : ( file : File ) => void ; onClick ? : ( event : React . MouseEvent < HTMLElement > ) => void ; disabled ? : boolean ; } const Template = ( args ) => < ImageUploader { ... args } / > ; export const Image = Template . bind ( { } ) ; Image . args = { title : 'Upload' , icon : ( ) => < ArrowForward />, handleFileChange : ( ) => { alert ( 'Uploaded!' ) ; } } ;