Skip to content

[docs] Fix incorrect import statement for legacy Outline icons#48112

Open
cyphercodes wants to merge 1 commit intomui:masterfrom
cyphercodes:fix-infooutline-import-docs
Open

[docs] Fix incorrect import statement for legacy Outline icons#48112
cyphercodes wants to merge 1 commit intomui:masterfrom
cyphercodes:fix-infooutline-import-docs

Conversation

@cyphercodes
Copy link
Copy Markdown

Problem

When clicking on icons with legacy 'Outline' suffix (e.g., InfoOutline) in the Material Icons search page, the click-to-copy import statement shows the wrong import path.

For example, for the InfoOutline icon:

  • Current (incorrect): import InfoOutlineIcon from '@mui/icons-material/InfoOutline';
  • Should be: import InfoOutlineIcon from '@mui/icons-material/InfoOutlined';

Solution

Added a helper function getCorrectImportName that maps legacy icon names ending with 'Outline' (but not 'Outlined') to their correct 'Outlined' variants for the import path.

Affected Icons

This fix applies to all icons that have both legacy 'Outline' and correct 'Outlined' variants, including:

  • InfoOutline → InfoOutlined
  • ErrorOutline → ErrorOutlined
  • HelpOutline → HelpOutlined
  • StarOutline → StarOutlined
  • And 20+ other icons

Fixes #47941

When clicking on icons with legacy 'Outline' suffix (e.g., InfoOutline),
the click-to-copy import statement showed the wrong import path.
The correct import should use 'Outlined' suffix (e.g., InfoOutlined).

Fixes mui#47941
@mui-bot
Copy link
Copy Markdown

mui-bot commented Mar 27, 2026

Netlify deploy preview

https://deploy-preview-48112--material-ui.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against cb06046

@zannager zannager added docs Improvements or additions to the documentation. scope: icons Changes related to the icons. labels Mar 27, 2026
@zannager zannager requested a review from siriwatknp March 27, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to the documentation. scope: icons Changes related to the icons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docs] Incorrect import statement in click-to-copy for InfoOutline icon

3 participants