Open tlrobinson opened 5 years ago
@tlrobinson It's an interesting idea.
But then maybe you could leave off the {...o}, which I assume is there to tell the plugin which components it should be applied to?
Yeah, {...o}
tell the plugin that element is overradable. But we can just make all elements inside component overridable.
Also, plugin provide access to individual props: <Container className={c("button", o.className)}
. I don't know, as it is possible to implement with babel-plugin-macros
.
Could this be implemented using babel-plugin-macros, which will work out of the box with
create-react-app
?You'd probably have to do something like:
But then maybe you could leave off the
{...o}
, which I assume is there to tell the plugin which components it should be applied to?