-
Notifications
You must be signed in to change notification settings - Fork 200
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
added propMerge() in react package #91
Conversation
this is great! I'm wondering though what you think about having a second style parameter that would be merged after the variant styles so that we could more easily handle theming. So it would do something like assign(baseStyles, variantStyles, themeStyles)? Are you using the themes from glamor/react? How are you handling them now? |
or, maybe even better? Have the mergeProps function handle theme props. I have a first hack at something like that working:
I haven't completely thought the through the implications of multiple themes, particularly on the non happy path where there are multiple variant styles. I'm not sure if there's anything else to do but merge them. |
@rszewczyk we do not use theming in our SPAs, so I can't help you a lot :/ |
Yep - we discussed it briefly in another issue. After his feedback, and some of my own experimentation, it doesn't seem like such a great idea after all. At least I couldn't figure out a way to make it work without making assumptions about how the user was going to use theming. As @threepointone pointed out in #95 - it's a little too much magic (I guess that'd be magic on top of magic). Thanks for indulging me @otbe. |
Any thoughts @threepointone ? :) |
Will merge this week, chill :) |
Great! Thanks! |
this is live in 2.17.15, give it a spin and lemme know how it goes. thanks @otbe! |
Like discussed in glamor gitter chatroom this PR adds a better way for composing react components with glamor styles.
Will result in