Skip to content

Commit 203a620

Browse files
committed
remove mui components from ListBase doc.
1 parent f8f8465 commit 203a620

File tree

1 file changed

+12
-18
lines changed

1 file changed

+12
-18
lines changed

docs/ListBase.md

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,28 @@ You can use `ListBase` to create your own custom reusable List component, like t
1919
```jsx
2020
import {
2121
ListBase,
22-
Title,
23-
ListToolbar,
24-
Pagination,
25-
DataTable,
22+
ListIterator,
2623
} from 'react-admin';
27-
import { Card } from '@mui/material';
2824

2925
const MyList = ({ children, actions, filters, title, ...props }) => (
3026
<ListBase {...props}>
31-
<Title title={title}/>
32-
<ListToolbar
27+
<h1>{title}</h1>
28+
<CustomToolbar
3329
filters={filters}
3430
actions={actions}
3531
/>
36-
<Card>
32+
<div>
3733
{children}
38-
</Card>
39-
<Pagination />
34+
</div>
35+
<CustomPagination />
4036
</ListBase>
4137
);
4238

4339
const PostList = () => (
4440
<MyList title="Post List">
45-
<DataTable>
41+
<ListIterator>
4642
...
47-
</DataTable>
43+
</ListIterator>
4844
</MyList>
4945
);
5046
```
@@ -78,16 +74,14 @@ If your `authProvider` implements [Access Control](./Permissions.md#access-contr
7874
For instance, for the `<PostList>` page below:
7975

8076
```tsx
81-
import { ListBase, DataTable } from 'react-admin';
77+
import { ListBase, ListIterator } from 'react-admin';
8278

8379
// Resource name is "posts"
8480
const PostList = () => (
8581
<ListBase>
86-
<DataTable>
87-
<DataTable.Col source="title" />
88-
<DataTable.Col source="author" />
89-
<DataTable.Col source="published_at" />
90-
</DataTable>
82+
<ListIterator>
83+
<CustomPostRenderer />
84+
</ListIterator>
9185
</ListBase>
9286
);
9387
```

0 commit comments

Comments
 (0)