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

[Box] Remove the clone prop #26031

Merged
merged 5 commits into from
Apr 29, 2021
Merged

[Box] Remove the clone prop #26031

merged 5 commits into from
Apr 29, 2021

Conversation

m4theushw
Copy link
Member

@m4theushw m4theushw commented Apr 29, 2021

Breaking changes

  • [Box] Remove the clone prop because its behavior can be obtained using the sx prop.

    -<Box sx={{ border: '1px dashed grey' }} clone>
    -  <Button>Save</Button>
    -</Box>
    +<Button sx={{ border: '1px dashed grey' }}>Save</Button>

Part of #20012
Closes #18496

@mui-pr-bot
Copy link

mui-pr-bot commented Apr 29, 2021

Details of bundle changes

Generated by 🚫 dangerJS against fd7771c

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor suggestions

docs/src/pages/components/box/box.md Outdated Show resolved Hide resolved
docs/src/pages/guides/migration-v4/migration-v4.md Outdated Show resolved Hide resolved
m4theushw and others added 3 commits April 29, 2021 08:34
Co-authored-by: Marija Najdova <mnajdova@gmail.com>
Co-authored-by: Marija Najdova <mnajdova@gmail.com>
- <Button>Save</Button>
-</Box>
+<Button sx={{ border: '1px dashed grey' }}>Save</Button>
```

2. Use render props
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we can drop this as well. It was added to solve the same problem that sx handles now.

Maybe a follow up or in the same PR? I mean, the problem we go after is the same, so happy with both options.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A follow up PR is better for the release notes.

@m4theushw m4theushw merged commit fdb352b into mui:next Apr 29, 2021
@m4theushw m4theushw deleted the box-remove-clone branch April 29, 2021 20:57
@m4theushw m4theushw mentioned this pull request May 4, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[system] Remove Box clone prop
4 participants