-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support jsx pragma for custom components #21
Comments
Babel plugin could be cool too. |
This would be a cool feature. I can definitely try to help with this. I'm not 100% sure how the theme-ui-native repo did it but it seemed like it just wrapped the components with a ThemeProvider. There's was working last time a played around with that repo not sure if that strategy would work for dripsy but it might be worth a shot looking at it. |
All we would really need to do is wrap the function with |
That seems like the move. On another note is it possible to remove styled-components as a dependency now that we have fresnel? Emotion seems like it's doing most of the heavy lifting style wise as a dependency to theme-ui. |
https://github.com/emotion-js/emotion/blob/master/packages/core/src/jsx.js (the original emotion file) |
Yeah, I believe I removed that as a dependency in the fresnel branch, but if I forgot, let's get rid of that. |
microsoft/TypeScript#38720 relevant for custom pragmas, heard through: https://devblogs.microsoft.com/typescript/announcing-typescript-4-0-rc/#custom-jsx-factories |
I'll try to get a PR for this created with in the next day or two. I think it should be relatively simple. I'll also take a look through that typescript article you sent over. |
That's great! I believe the TS article helps with the |
Yeah, I have it's a pain. |
I think I know how this could work, but I have to look into the theme ui code to be sure.
The hurdle is that we need to hook into the component, not just pass a raw className prop.
The text was updated successfully, but these errors were encountered: