Skip to content

Commit

Permalink
Fix README
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Apr 12, 2022
1 parent ccc5299 commit a408de0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ import { List, Datagrid, Edit, Create, SimpleForm, DateField, TextField, EditBut
import BookIcon from '@mui/icons-material/Book';
export const PostIcon = BookIcon;

export const PostList = (props) => (
<List {...props}>
export const PostList = () => (
<List>
<Datagrid>
<TextField source="id" />
<TextField source="title" />
Expand All @@ -89,8 +89,8 @@ const PostTitle = () => {
return <span>Post {record ? `"${record.title}"` : ''}</span>;
};

export const PostEdit = (props) => (
<Edit title={<PostTitle />} {...props}>
export const PostEdit = () => (
<Edit title={<PostTitle />}>
<SimpleForm>
<TextInput disabled source="id" />
<TextInput source="title" />
Expand All @@ -103,8 +103,8 @@ export const PostEdit = (props) => (
</Edit>
);

export const PostCreate = (props) => (
<Create title="Create a Post" {...props}>
export const PostCreate = () => (
<Create title="Create a Post">
<SimpleForm>
<TextInput source="title" />
<TextInput source="teaser" options={{ multiline: true }} />
Expand Down

0 comments on commit a408de0

Please sign in to comment.