Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][ListItem] Replace <ListItem button/> with <ListItemButton/> in composition guide #43356

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/data/material/guides/composition/composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ The following example will render the `List` component with a `<nav>` element as

```jsx
<List component="nav">
<ListItem button>
<ListItemButton>
<ListItemText primary="Trash" />
</ListItem>
<ListItem button>
</ListItemButton>
<ListItemButton>
<ListItemText primary="Spam" />
</ListItem>
</ListItemButton>
</List>
```

Expand All @@ -67,10 +67,10 @@ function ListItemLink(props) {

return (
<li>
<ListItem button component={CustomLink}>
<ListItemButton component={CustomLink}>
<ListItemIcon>{icon}</ListItemIcon>
<ListItemText primary={primary} />
</ListItem>
</ListItemButton>
</li>
);
}
Expand Down Expand Up @@ -101,10 +101,10 @@ function ListItemLink(props) {

return (
<li>
<ListItem button component={CustomLink}>
<ListItemButton component={CustomLink}>
<ListItemIcon>{icon}</ListItemIcon>
<ListItemText primary={primary} />
</ListItem>
</ListItemButton>
</li>
);
}
Expand All @@ -118,7 +118,7 @@ In this example, we don't create any intermediary component:
```jsx
import { Link } from 'react-router-dom';

<ListItem button component={Link} to="/">
<ListItemButton component={Link} to="/">
```

:::warning
Expand Down
Loading