Skip to content
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

Object properties can be merged instead of overwrite #32

Closed
wants to merge 8 commits into from

Conversation

tkow
Copy link
Contributor

@tkow tkow commented Oct 28, 2022

Check this after #31.

This is for such as media parameter can be value objects.
If using overwrite,

{ 
  "@bp": {
      width: '20px',
   },
  "someUtilFunc":  true
  // suppose generating "@bp": {
  //      height: 20px,
  // }, 
}

will omit width with util function because the latter overwrites the former.
Furthermore,

styled("View", { 
  "@bp": {
      width: '20px',
   }
},
{
   "@bp": {
      height: '20px',
   }, 
})

is same result and it looks bug as I expected. I fix it to get result the followed by in both case with some refactoring to make code readable.

{
  "@bp": {
     width: 20px,
     height: 20px,
  }, 
}

@tkow
Copy link
Contributor Author

tkow commented Oct 30, 2022

It's merged with #33.

@tkow tkow closed this Oct 30, 2022
@tkow tkow deleted the feat/merge-media branch November 8, 2022 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant