import React from 'react' ; import { Story , Meta } from '@storybook/react' ; import { SuccessButton , IButtonProps } from '.' ; const Template = ( args ) => ( < SuccessButton { ... args } > Press me < /SuccessButton>); export default { title : 'Components/Buttons/SuccessButton' , component : SuccessButton , argTypes : { icon : { control : { type : 'select' , options : [ ] } } , align : { control : { type : 'select' , options : [ 'LEFT' , 'RIGHT' ] } } } } as Meta ; export const SuccessButtonWithIcon = Template . bind ( { } ) ; SuccessButtonWithIcon . args = { id : 'myButton' , onClick : ( ) => alert ( 'hello' ) , align : 0 , icon : ( ) => ( < svg width = "29" height = "14" > < title > Group < /title> < g fill - rule = "nonzero" stroke = "#4C68C1" stroke - width = "2.5" fill = "none" stroke - linecap = "round" > < path d = "M27 7H4.059" / > < path stroke - linejoin = "round" d = "M7.17 12.355L1.762 6.948l5.304-5.303" / > < /g> < /svg>) } ; export const SuccessButtonWithoutIcon = Template . bind ( { } ) ; SuccessButtonWithoutIcon . args = { id : 'myButton' , onClick : ( ) => alert ( 'Hello' ) } ;