Skip to content

Commit

Permalink
update migration doc
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Jan 9, 2025
1 parent 60a0c75 commit f93ba1b
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,36 @@ Here's how to migrate:
},
```

## CardHeader

Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#card-header-props) below to migrate the code as described in the following sections:

```bash
npx @mui/codemod@latest deprecations/card-header-props <path>
```

### titleTypographyProps

The CardHeader's `titleTypographyProps` props were deprecated in favor of `slotProps.title`:

```diff
<CardHeader
- titleTypographyProps={titleTypographyProps}
+ slotProps={{ title: titleTypographyProps }}
/>
```

### subheaderTypographyProps

The CardHeader's `subheaderTypographyProps` props were deprecated in favor of `slotProps.subheader`:

```diff
<CardHeader
- subheaderTypographyProps={subheaderTypographyProps}
+ slotProps={{ subheader: subheaderTypographyProps }}
/>
```

## Chip

Use the [codemod](https://github.com/mui/material-ui/tree/HEAD/packages/mui-codemod#chip-classes) below to migrate the code as described in the following sections:
Expand Down

0 comments on commit f93ba1b

Please sign in to comment.