Skip to content

Commit a01276b

Browse files
committed
Added Menu Icons
1 parent 0c7d80a commit a01276b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/App.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
// Added Search And Filters To The List
1+
// Added Menu Icons
22
// https://marmelab.com/react-admin/Tutorial.html
33

44
import React from 'react';
55
import { Admin, Resource } from 'react-admin';
66
import { PostList, PostEdit, PostCreate } from './posts'
77
import { UserList } from './users'
88
import jsonServerProvider from 'ra-data-json-server';
9+
import PostIcon from '@material-ui/icons/Book'
10+
import UserIcon from '@material-ui/icons/Group'
911

1012
const dataProvider = jsonServerProvider('http://jsonplaceholder.typicode.com');
1113

1214
const App = () => (
1315
<Admin dataProvider={dataProvider} >
14-
<Resource name="posts" list={PostList} edit={PostEdit} create={PostCreate} />
15-
<Resource name="users" list={UserList} />
16+
<Resource name="posts" list={PostList} edit={PostEdit} create={PostCreate} icon={PostIcon} />
17+
<Resource name="users" list={UserList} icon={UserIcon} />
1618
</Admin>
1719
)
1820

0 commit comments

Comments
 (0)