Skip to content

[Box] Remove the clone prop#26031

Merged
m4theushw merged 5 commits intomui:nextfrom
m4theushw:box-remove-clone
Apr 29, 2021
Merged

[Box] Remove the clone prop#26031
m4theushw merged 5 commits intomui:nextfrom
m4theushw:box-remove-clone

Conversation

@m4theushw
Copy link
Collaborator

@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

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 sx={{ border: '1px dashed grey' }}>Save</Button>
```

2. Use render props
Copy link
Member

@oliviertassinari oliviertassinari Apr 29, 2021

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
Collaborator 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.

@oliviertassinari oliviertassinari added breaking change Introduces changes that are not backward compatible. component: Box The React component. labels Apr 29, 2021
@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

breaking change Introduces changes that are not backward compatible. component: Box The React component.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[system] Remove Box clone prop

4 participants