Skip to content

Instantly share code, notes, and snippets.

@kenjinp
Created August 17, 2017 12:26
Show Gist options
  • Save kenjinp/25f830d0ea63c89da4db27ca126f4057 to your computer and use it in GitHub Desktop.
Save kenjinp/25f830d0ea63c89da4db27ca126f4057 to your computer and use it in GitHub Desktop.

Revisions

  1. kenjinp created this gist Aug 17, 2017.
    26 changes: 26 additions & 0 deletions index.jsx
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    export const UserEdit = (props) => (
    <Edit title="Edit User" {...props}>
    <SimpleForm>
    <DisabledInput source="_id" />
    <TextInput source="username" />
    <TextInput source="staffNumber" />

    </SimpleForm>
    </Edit>
    );

    // is the same as

    export const UserEdit = (props) => {
    console.log(props)
    return (
    <Edit title="Edit User" {...props}>
    <SimpleForm>
    <DisabledInput source="_id" />
    <TextInput source="username" />
    <TextInput source="staffNumber" />

    </SimpleForm>
    </Edit>
    );
    }