added new Resource todo
This commit is contained in:
12
src/components/todos/TodoEdit.tsx
Normal file
12
src/components/todos/TodoEdit.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { BooleanInput, Edit, ReferenceInput, SimpleForm, TextInput } from 'react-admin';
|
||||
|
||||
export const TodoEdit = () => (
|
||||
<Edit>
|
||||
<SimpleForm>
|
||||
<ReferenceInput source="userId" reference="users" />
|
||||
<TextInput source="id" />
|
||||
<TextInput source="title" />
|
||||
<BooleanInput source="completed" />
|
||||
</SimpleForm>
|
||||
</Edit>
|
||||
);
|
||||
12
src/components/todos/TodoList.tsx
Normal file
12
src/components/todos/TodoList.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { BooleanField, Datagrid, List, ReferenceField, TextField } from 'react-admin';
|
||||
|
||||
export const TodoList = () => (
|
||||
<List>
|
||||
<Datagrid>
|
||||
<ReferenceField source="userId" reference="users" />
|
||||
<TextField source="id" />
|
||||
<TextField source="title" />
|
||||
<BooleanField source="completed" />
|
||||
</Datagrid>
|
||||
</List>
|
||||
);
|
||||
12
src/components/todos/TodoShow.tsx
Normal file
12
src/components/todos/TodoShow.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { BooleanField, ReferenceField, Show, SimpleShowLayout, TextField } from 'react-admin';
|
||||
|
||||
export const TodoShow = () => (
|
||||
<Show>
|
||||
<SimpleShowLayout>
|
||||
<ReferenceField source="userId" reference="users" />
|
||||
<TextField source="id" />
|
||||
<TextField source="title" />
|
||||
<BooleanField source="completed" />
|
||||
</SimpleShowLayout>
|
||||
</Show>
|
||||
);
|
||||
Reference in New Issue
Block a user