Allow assignInlineVars and setElementVars to accept potentially null or undefined values when a theme contract is not provided#1175
Conversation
🦋 Changeset detectedLatest commit: 4961d76 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
|
Thanks for the PR @youngkyo0504! This doesn't quite address the issue though, as you still can't actually assign The other issue that needs to be addressed is what to actually do with the |
|
@askoufis Thanks for the reply! I think the issue have difference with my case. In my case DeepPartial does not work. I wrote test case wrong by mistake. It is correct test case in my case. const style = assignInlineVars<DeepPartial<S>>(vars,{
color: 'red'
})but It have somthing in common with that issue. But it doesn't work in the test cases in issue. could I do additional work again? If |
28dfa89 to
9c89553
Compare
|
I add additional work in 9c89553. |
8b47b88 to
adf654e
Compare
…ct into assign-inline-vars-optional
|
@youngkyo0504 I've added some changes on top of your work. I've narrowed the scope of the PR to only address the case where a theme contract is not passed. This is the issue specified in #536. You have a separate use case that may require further work, but that should be addressed in a separate PR. Please raise an issue if you are still interested in this use case. There was no need to modify This feature really only applies to the first overload of Additionally, I added the same functionality to Finally I added some docs for this feature. |
assignInlineVars and setElementVars to accept potentially null or undefined values when a theme contract is not provided
assignInlineVars and setElementVars to accept potentially null or undefined values when a theme contract is not providedassignInlineVars and setElementVars to accept potentially null or undefined values only when a theme contract is not provided
assignInlineVars and setElementVars to accept potentially null or undefined values only when a theme contract is not providedassignInlineVars and setElementVars to accept potentially null or undefined values when a theme contract is not provided
Fixes #536
It works!
EDIT: The code snippet above is not a reflection of the feature implemented in this PR. See the linked issue or the comment below for more details.