-
Notifications
You must be signed in to change notification settings - Fork 66
Feature/theme spreads #47
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
Feature/theme spreads #47
Conversation
@TheSBros Hi, I've changed your initial typing of UPDATE: everything is ok with |
@raveclassic If you look at #39 (comment) , there was a reason why I changed from ComponentClass. It's currently late for me - but I will confirm if it still works in that situation tomorrow. |
@TheSBros I see the problem now. Will try to handle it somehow. |
|
Ok, I'm reverting typings changes because they are not related to initial PR. Only the part with |
I'm sorry about this mess with PR :) |
Thank you both! I think it makes total sense. I'm not very familiar with TS though. I want to get into it but I'm lacking time to do so. It's a very nice contribution, congrats :) |
@javivelasco Ok, I'll open a PR with a switch to TS when I have some free time. Surely build process migration will be completely transparent for you. |
* refactoring * theme spreads * typings * fix themr typing * fix themr typing * fix undefined mixin value cases * fix state type incompatibility in javivelasco#39 * revert typing changes * accept sfc as component * typo * also accept symbols and numbers as identifier * merge sfc fix
Hi @javivelasco!
Firstly, my congrats on getting to 2.0 major!
Now about this PR.
Currently it's only possible to construct complex themes from more than two modules by composing
themeable
function which is far from convenient. Taking ES6 spreads into account this PR provides possibility to pass more than two arguments tothemeable
:Also it contains some refactoring of
themeable
function as it started to grow with type-check conditionals and setting of default values which is all pretty hard to maintain.All tests pass, so take a look!
Update: I have found some TS typings added quite recently. Also
themr
build step is simple as hell - just ababel
run. So I'd like to suggest switching to TS completely to be fully consistent with these typings and to enforce some real type checking. This is just a suggestion and I could prepare a simple PR with all code rewritten to TS. What do you think?