-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
0 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,33 +8,6 @@ githubLabel: 'component: avatar' | |
|
||
<p class="description">An avatar is a graphical representation of a user's identity.</p> | ||
|
||
:::warning | ||
**imgProps** prop has been removed in [`@mui/[email protected]`](https://github.com/mui/material-ui/releases/tag/v5.11.6). | ||
|
||
## Migration | ||
|
||
### Codemod | ||
|
||
Run this [codemod](https://github.com/mui/material-ui/blob/master/packages/mui-codemod/README.md#joy-text-field-to-input) in your project's terminal: | ||
|
||
```sh | ||
npx @mui/codemod v5.0.0/joy-text-field-to-input <path> | ||
``` | ||
|
||
It will go through all files under `<path>` and replace `<TextField />` with the `<Input />` composition. | ||
|
||
### Manual | ||
|
||
Remove `imgProps` prop by transferring its value into `slotProps.img`: | ||
|
||
```diff | ||
<Avatar | ||
- imgProps={{ ['data-id']: 'imageId' }} | ||
- slotProps={{ root: { ['data-id']: 'rootId' }}} | ||
+ slotProps={{ root: { ['data-id']: 'rootId' }, img: { ['data-id']: 'imageId' } }} | ||
/> | ||
``` | ||
|
||
## Introduction | ||
|
||
The Avatar component can be used to display graphical information about a user in places such as menus, tables, and chats. | ||
|