import * as React from "react" ; import { Create , SelectInput , SimpleForm , TextInput } from "react-admin" ; import { Roles } from "../../shared/types" ; const choices = Roles . map ( ( r ) => ( { id : r , name : r } ) ) ; type Props = { } ; export default ( props ) : JSX . Element => ( < Create { ... props } > < SimpleForm > < TextInput source = "email" / > < TextInput source = "password" type = "password" / > < TextInput source = "firstName" / > < TextInput source = "lastName" / > < SelectInput source = "role" choices = { choices } / > < /SimpleForm> < /Create>);