Slide 20
Slide 20 text
Creating Components
Create a Wizard to collect information
about a car accident. The
fi
rst step is to
collect a clients information as well as the
insurance ID. The second step is about
collection information on the accident,
What type of accident, which other party
is involved, which fault it was. The third
and
fi
nal step is about accepting the
terms of use and a check if it is ok to
process these data.
steps: [
{
title: 'Client Information',
description: 'Please provide your personal and insurance info
fields: [
{
type: 'text',
description: 'Enter your legal first name as it appea
label: 'First Name',
required: true,
key: 'firstName',
},
…
],
},
],
[
{
title: 'Accident Information',
description: 'Please provide details about the accident',
fields: [
{
type: 'select',
description: 'Select the type of accident',
label: 'Type of Accident',
required: true,
key: ‘accidentType',
options: [
{ value: 'collision', label: 'Collision' },
{ value: 'theft', label: 'Theft' },
{ value: 'vandalism', label: 'Vandalism' },
{ value: 'other', label: 'Other' },
],