What I have
Hello, I have a functional component like this:
importstyledfrom"styled-components";exporttypeButtonProps={children: string;};exportconstButton=styled.button<ButtonProps>` color: ${({ theme })=>theme.color.highlight}; padding: 1em;`;exportdefaultButton;What is happening
And if I run the command zeplin connect it fails with the following error:
Connecting components to Zeplin components failed.
Error occurred while processing components/button/index.tsx with @zeplin/cli-connect-react-plugin:
No suitable component definition found.
If i rewrite the component to an class like this:
importReactfrom'react';importstyledfrom"styled-components";exporttypeButtonProps={children: string;};exportconstButton=styled.button<ButtonProps>` color: ${({ theme })=>theme.color.highlight}; padding: 1em;`;exportdefaultclassButtonClassextendsReact.Component{render(){returnButton}}It works well.
What I expected
I expected I can connect functional components also with zeplin. but it looks like this is not correct.
Can someone confirm that or show me a working solution for my code?
What I have
Hello, I have a functional component like this:
What is happening
And if I run the command
zeplin connectit fails with the following error:If i rewrite the component to an class like this:
It works well.
What I expected
I expected I can connect functional components also with zeplin. but it looks like this is not correct.
Can someone confirm that or show me a working solution for my code?