martinandert / babel-plugin-css-in-js

A plugin for Babel v6 which transforms inline styles defined in JavaScript modules into class names so they become available to, e.g. the `className` prop of React elements. While transforming, the plugin processes all JavaScript style definitions found and bundles them up into a CSS file, ready to be requested from your web server.
MIT License
299 stars 11 forks source link

Support function expression #15

Closed b6pzeusbc54tvhw5jgpyw8pwz2x6gs closed 7 years ago

b6pzeusbc54tvhw5jgpyw8pwz2x6gs commented 7 years ago

To write dynamic style rules, now we can use FunctionExpression. This PR includes code change, some test code and added documentation. Also maybe two #9 #13 issues will be resolved by this PR. In my environment, all test case is passed.

Thanks.

martinandert commented 7 years ago

Hi, I didn't find the time to look into this in the past days, but will do so shortly. Sorry for the delay.

b6pzeusbc54tvhw5jgpyw8pwz2x6gs commented 7 years ago

If is there anything else you'd like or if you have questions, please feel free to ask me.

martinandert commented 7 years ago

Hi Alfred, thanks for your work, good job! I've merged it and released a new minor version (after cleaning things up a bit).

If you have any questions, please let me know.