Skip to content

Commit

Permalink
update migration guide on Button with loading state
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeshanTamboli committed Nov 9, 2024
1 parent c24da44 commit d160f4c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions docs/data/material/migration/upgrade-to-v6/upgrade-to-v6.md
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,21 @@ As the `ListItem` no longer supports these props, the class names related to the
+listItemButtonClasses.selected
```

### Loading Button
### Button with Loading State

In v6, the `children` prop passed to the Loading Button component is now wrapped in a `<span>` tag to avoid [issues](https://github.com/mui/material-ui/issues/27853) when using tools to translate websites.
As of `@mui/material` **v6.2.0**, the `LoadingButton` from MUI Lab has been removed. Loading functionality is now part of the standard `Button` component. Update your import as follows:

```diff
-import { LoadingButton } from '@mui/lab';
+import { Button } from '@mui/material';
```

```diff
-import LoadingButton from '@mui/lab/LoadingButton';
+import Button from '@mui/material/Button';
```

For more details, see the [Loading section](/material-ui/react-button/#loading) in the [Material UI `Button` documentation](/material-ui/react-button/).

### Typography

Expand Down

0 comments on commit d160f4c

Please sign in to comment.