Skip to content

[material-ui][Button] startIcon size is different when icon is wrapped with Badge #39544

Open
@cherniavskii

Description

@cherniavskii

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Steps to reproduce 🕹

Link to live example: https://codesandbox.io/s/loving-booth-8zq3q7?file=/src/Demo.js

Current behavior 😯

The startIcon wrapped into Badge is larger than the one that is not wrapped with Badge

Expected behavior 🤔

Both icons should be of the same size.

Context 🔦

This is coming from the DataGrid's toolbar issue, where the "Filters" button is wrapped with Badge:

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: buttonThis is the name of the generic UI component, not the React module!package: material-uiSpecific to @mui/material

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions