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

Allow for Spacing utility classes in more components #17816

Closed
1 task done
mcnedward opened this issue Oct 10, 2019 · 2 comments
Closed
1 task done

Allow for Spacing utility classes in more components #17816

mcnedward opened this issue Oct 10, 2019 · 2 comments
Labels
duplicate This issue or pull request already exists new feature New feature or request package: system Specific to @mui/system

Comments

@mcnedward
Copy link

Right now, it seems like the Spacing utility classes are not available in certain components, for example I was trying to use them in my Buttons.

I'm not sure if this is by design or not, but I would expect to be able to use these class props on any of the components (and actually I would think the same should be true for the Sizing utility classes).

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

Summary 💡

I should be able to use margin and padding utility classes, and sizing utility classes, in components like Button.

Examples 🌈

Here are my components:

<Button width={300} m={5} px={5}>
  No spacing
</Button>
<Box width={400} p={1} my={1} bgcolor="grey.300">
  Width 300
</Box>

And what I get:
image

Motivation 🔦

I want to have buttons right next to each other with some margins in between them without having to create and add a className to those components.

@oliviertassinari
Copy link
Member

@mcnedward I'm at 💯💯% with that proposal. We keep track of the progress in #15561.

@oliviertassinari oliviertassinari added the duplicate This issue or pull request already exists label Oct 10, 2019
@mcnedward
Copy link
Author

Sounds good, I didn't see that issue. Thanks!

@oliviertassinari oliviertassinari added new feature New feature or request package: system Specific to @mui/system labels Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists new feature New feature or request package: system Specific to @mui/system
Projects
None yet
Development

No branches or pull requests

2 participants