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 wrapped around Divider doesn't accept margin props #16666

Closed
2 tasks done
zeckdude opened this issue Jul 20, 2019 · 1 comment
Closed
2 tasks done

Box wrapped around Divider doesn't accept margin props #16666

zeckdude opened this issue Jul 20, 2019 · 1 comment
Labels
package: system Specific to @mui/system

Comments

@zeckdude
Copy link
Contributor

When wrapping the Divider component with the Box component to get access to the utility props, the margin props aren't working.

  • This is not a v0.x issue.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior 🤔

The margin props should set the margin styling on the component that is passed to `Box`.

Current Behavior 😯

The margin props are being ignored.

Steps to Reproduce 🕹

https://stackblitz.com/edit/uaeepa

Context 🔦

I want to be able to add margin on the Divider without having to wrap Box around it

Your Environment 🌎

Tech Version
Material-UI v4.0.1
React 16.8.6
Browser Chrome 75.0.3770.142
TypeScript No
@oliviertassinari
Copy link
Member

@zeckdude This is a known limitation. You have to reverse the import order to get the CSS injection order correct:

import Divider from '@material-ui/core/Divider';
import Box from '@material-ui/core/Box';

We want to make the system native in #15561. It wouldn't suffer from this problem.

@oliviertassinari oliviertassinari added the package: system Specific to @mui/system label Jul 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: system Specific to @mui/system
Projects
None yet
Development

No branches or pull requests

2 participants