Skip to content

[Box] Remove the clone prop#26031

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

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

Conversation

@m4theushw

@m4theushw m4theushw commented Apr 29, 2021

Copy link
Copy Markdown
Collaborator

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

mui-pr-bot commented Apr 29, 2021

Copy link
Copy Markdown

Details of bundle changes

Generated by 🚫 dangerJS against fd7771c

@mnajdova mnajdova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Couple of minor suggestions

Comment thread docs/src/pages/components/box/BoxRenderProps.js
Comment thread docs/src/pages/components/box/box.md Outdated
Comment thread docs/src/pages/guides/migration-v4/migration-v4.md Outdated
+<Button sx={{ border: '1px dashed grey' }}>Save</Button>
```

2. Use render props

@oliviertassinari oliviertassinari Apr 29, 2021

Copy link
Copy Markdown
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
Copy Markdown
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