xxxxxxxxxx
# Step 1: Install the dependencies
npm install @material-ui/core @material-ui/icons
# or
yarn add @material-ui/core @material-ui/icons
xxxxxxxxxx
// with npm
npm install @material-ui/icons
// with yarn
yarn add @material-ui/icons
These components use the Material-UI SvgIcon component to render the SVG path for each icon, and so a have a peer-dependency on the next release of Material-UI.
// with npm
npm install @material-ui/core
// with yarn
yarn add @material-ui/core
xxxxxxxxxx
// with npm
npm install @emotion/react @emotion/styled @mui/icons-material @mui/material @mui/utils
// with yarn
yarn add @emotion/react @emotion/styled @mui/icons-material @mui/material @mui/utils
xxxxxxxxxx
import React from 'react';
import IconButton from '@mui/material/IconButton';
import AddIcon from '@mui/icons-material/Add';
const MyComponent = () => {
return (
<IconButton color="primary">
<AddIcon />
</IconButton>
);
};
export default MyComponent;
xxxxxxxxxx
ERROR in ./src/component/Create/Create.js 7:0-52
Module not found: Error: Can't resolve '@mui/icons-material/Delete' in 'D:\Saylani\Web Development\Assignment16\assignment\src\component\Create'