Code Preview #81
severinlandolt
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all! Just found thid over at twitter, looks very very promising.
I am maintaining the docs over at @tremorlabs, and there is one thing I have not found a nice solution. For some components in our library we have this Preview/Code element.
This component lives in another file, where pass the Code snippet as a prop. And what should be displayed is just a child. As you can immagine, this approach is prone to errors. I have to have my imports a the top of the file but I have to add them to the displayed code snippet as well as the function declaration etc.
How would yo solve this?
Beta Was this translation helpful? Give feedback.
All reactions