react-native icon indicating copy to clipboard operation
react-native copied to clipboard

addDecorator() argument typing.

Open s5unanow opened this issue 5 years ago • 7 comments

Have a problem with TypeScript using addDecorator() function image

So there probably should be a way to add typing to addDecorator() argument.

Managed to solve adding an interface to CenterView component like that image But it's probably a workaround, not a complete solution.

s5unanow avatar Dec 09 '20 05:12 s5unanow

Hey thanks for creating this issue, this is something I myself have run into so I understand how annoying it can be. My workaround is usually to do (story:any) on the decorator rather than changing the components prop typing. Ideally storybook shouldn't change the way you use your component.

Anyway this will get fixed, however I'm focused on 6.0 now so it might have to be with that release.

dannyhw avatar Dec 11 '20 09:12 dannyhw

Also running into this issue, anyone found a decent workaround?

MorelSerge avatar Feb 05 '21 12:02 MorelSerge

Can you check with the latest version 5.3.25?

dannyhw avatar Feb 26 '21 10:02 dannyhw

@dannyhw typing changes, but not fixed :/ image

StampixSMO avatar Feb 26 '21 12:02 StampixSMO

Ok well it seems like I need to take another look at it, thanks for letting me know. If anyone want to take this one I'm open to PR's :)

dannyhw avatar Feb 26 '21 15:02 dannyhw

Ok well it seems like I need to take another look at it, thanks for letting me know. If anyone want to take this one I'm open to PR's :)

@dannyhw - I could give it a try :)

chitra591 avatar Mar 23 '21 18:03 chitra591

@chitra591 that would be great, if you need any help I'm available :). If you want to chat you can find me in the react-native channel on the discord: https://discord.gg/sMFvFsG

dannyhw avatar Mar 23 '21 19:03 dannyhw

Hey @s5unanow

This issue looks a bit old, there is a new way to add decorators now compatible with storybook 6.5 and the last CSF syntax. Do you think you can upgrade and close this issue?

flexbox avatar Mar 31 '23 13:03 flexbox

Hey @flexbox , thanks for updating. As for now I am not able to test given functionality, but much appreciate it has been solved.

Closing this issue.

s5unanow avatar Apr 02 '23 07:04 s5unanow