From 0fc88d371695971b42a372356ffb24f6763e55db Mon Sep 17 00:00:00 2001 From: asvarcas Date: Fri, 13 Mar 2020 11:09:56 -0300 Subject: [PATCH] Fix code sample in CreateEdit docs. --- docs/CreateEdit.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/CreateEdit.md b/docs/CreateEdit.md index bd97f261195..aa271eb8dea 100644 --- a/docs/CreateEdit.md +++ b/docs/CreateEdit.md @@ -1042,18 +1042,28 @@ The `` and `` layouts are quite simple. In order to bett Here is an example of such custom form, taken from the Posters Galore demo. It uses [material-ui's `` component](https://material-ui.com/components/box/), and it's a good starting point for your custom form layouts. ```jsx +import React from 'react'; import { FormWithRedirect, DateInput, SelectArrayInput, TextInput, - Toolbar, SaveButton, DeleteButton, + NullableBooleanInput, } from 'react-admin'; -import { CardContent, Typography, Box, Toolbar } from '@material-ui/core'; - -const VisitorForm = (props) => ( +import { Typography, Box, Toolbar } from '@material-ui/core'; + +const segments = [ + { id: 'compulsive', name: 'Compulsive' }, + { id: 'collector', name: 'Collector' }, + { id: 'ordered_once', name: 'Ordered Once' }, + { id: 'regular', name: 'Regular' }, + { id: 'returns', name: 'Returns' }, + { id: 'reviewer', name: 'Reviewer' }, +]; + +const VisitorForm = props => ( (