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
Fix the way to calculate processedProps #283
Fix the way to calculate processedProps #283
Conversation
🦋 Changeset detectedLatest commit: 98b259d The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 98b259d:
|
Thanks for bringing this up. I was able to reproduce the issue on my local environment as well. I noticed that this issue doesn't occur with I'll probably take a closer look within the next week. |
Thank you for response. |
Hi, I investigated about this build error( |
The error is caused by a circular reference.
The following fix resolves this error. import { toCssUnit } from "./toCSS";
Your fix is appropriate 👍 |
@@ -81,7 +104,7 @@ export const compose = (...styleFunctions: StyleFunction[]): StyleFunction => { | |||
|
|||
const processedProps = Object.keys(outputProps).filter((key) => | |||
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- FIXME | |||
newStyles.base.includes(`${outputProps[key as keyof StyledProps]}:`) | |||
newStyles.base.includes(`${styleMappings[key as StyledKeyType]}:`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good fix 🎉
It was not appropriate to use CSS values to extract processed props; it is correct to use CSS properties.
Thank you @kotarella1110 🙇♂️ |
@kotarella1110 Thank you for your review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! LGTM 🎉
@mehm8128 please fix lint error 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work 🙌
I found that when I use both
textAlign='right'
andmarginRight={4}
, the former is not applied.For example:
The below code,
aaa
andbbb
is right-aligned butccc
is not aligned.So, I tried to fix it, but an error
TypeError: compose is not a function
occurred.Could you check my code? (both whether my fix is proper fix and why this error occurs)
additional information: when I remove
backgroundMappings
fromstyleMappings
, it works expectedly:thinking:And declare it in other file and import it, this also works expectedly.