mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.61k stars 32.21k forks source link

[docs] Material Icon Imports wrong in docs #42534

Closed BreezySMX closed 3 months ago

BreezySMX commented 4 months ago

Related page

https://mui.com/material-ui/material-icons/?query=playlist

Kind of issue

Broken demo

Issue description

Using the MUI Icons docs located here: https://mui.com/material-ui/material-icons/?query=playlist

And clicking PlaylistAdd and PaylistRemove, presents the following import:

import PlaylistAddIcon from '@mui/icons-material/PlaylistAdd';
import PlaylistRemoveIcon from '@mui/icons-material/PlaylistRemove';

However this is incorrect. It should be:

import PlaylistAdd from '@mui/icons-material/PlaylistAdd';
import PlaylistRemove from '@mui/icons-material/PlaylistRemove';

I'm new to js/react/mui, but I'm pretty sure I have the most up to date version of Material Icons, from my package-lock.json:

        "@material-ui/styled-engine": "^5.0.0-alpha.11",
        "@mui/icons-material": "^5.15.19",
        "@mui/material": "^5.15.18",
        "@mui/x-charts": "^7.5.1",

Context

Just use icons on my buttons.

Search keywords: Material Icon Imports wrong in docs

ZeeshanTamboli commented 3 months ago

Why is this incorrect? It's a default export and can be imported with any name.