Skip to content

Commit

Permalink
Remove migration section
Browse files Browse the repository at this point in the history
  • Loading branch information
hbjORbj committed Jan 19, 2023
1 parent 2cd498d commit 8337e9f
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions docs/data/joy/components/avatar/avatar.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8337e9f

Please sign in to comment.