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

[RaisedButton] whitespace around while using flexbox for parent div and child height is bigger than btn #4458

Closed
liesislukas opened this issue Jun 9, 2016 · 2 comments
Labels
component: button This is the name of the generic UI component, not the React module! package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.

Comments

@liesislukas
Copy link
Contributor

liesislukas commented Jun 9, 2016

Problem description

I had this issue many times while using buttons:

image

solution is dead simple, just wrap button with extra div and it's solved. I think it would be nice if that extra div would be just inside component and there would be no need to wrap.

Steps to reproduce

<div style={{display: 'flex'}}>
  <div style={{height: 70}}>

  </div>
  <RaisedButton primary={true} label={'hi'}/>
</div>

SOLUTION - add extra div around RaisedButton:

<div style={{display: 'flex'}}>
  <div style={{height: 70}}>

  </div>
  <div>
    <RaisedButton primary={true} label={'hi'}/>
  </div>
</div>

Versions

  • Material-UI: 0.15.0
  • React: 15.1.0
  • Browser: Chrome: Version 51.0.2704.84 (64-bit)
@gausie
Copy link

gausie commented Jul 11, 2016

Also experiencing this bug (with 0.15.2). Thanks for the workaround.

@mpontikes mpontikes mentioned this issue Aug 5, 2016
13 tasks
@aahan96
Copy link
Contributor

aahan96 commented Aug 16, 2016

@liesislukas That's how components have been written. However, now an error is showed if a RaisedButton is used outside of a div

@aahan96 aahan96 closed this as completed Aug 16, 2016
@oliviertassinari oliviertassinari added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 21, 2022
@zannager zannager added component: button This is the name of the generic UI component, not the React module! package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5. and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: button This is the name of the generic UI component, not the React module! package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.
Projects
None yet
Development

No branches or pull requests

5 participants