-
Notifications
You must be signed in to change notification settings - Fork 98
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
Transform key values #386
Comments
Okey I could transform my styles in driver function. |
Seems like useStyletron css doesn't goes through driver so this issue is still relevant. |
Could you wrap/reexport |
Smart! Then I don’t need to create a new hook. Still think this issue is a good feature tho. My primary goal with transform is to extract shorthand’s and I think that’s something most people want to do if they want to get as much as possible out of styletron. |
What do you mean by extracting shorthands? |
I’m extracting padding, margin, flex and border shorthands to long hands. |
If you have a theme as implemented in the baseui library, you can solve this by creating in the theme objects a Theme.mixin.margin function and either pass in a string , or parameters to apply to the shorthand properties |
Hi!
Would love to be able to transform keys and values with a custom function, maybe pass it in to createdStyled? If I havent missed anything it shouldn't be too much work, can gladly help.
I knwo that we have withTransform but i need to transform keys and values before deepMerge is called and the only workaround ive seen is to write my own custom
createStyledElementComponent
function.The text was updated successfully, but these errors were encountered: