Skip to content

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

Open
@cherniavskii

Description

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

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