-
Notifications
You must be signed in to change notification settings - Fork 126
/
yourContactInformation.js
36 lines (34 loc) · 1.05 KB
/
yourContactInformation.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// import emailUI from '@department-of-veterans-affairs/platform-forms-system/email';
// import phoneUI from '@department-of-veterans-affairs/platform-forms-system/phone';
import {
emailSchema,
emailUI,
phoneSchema,
phoneUI,
radioSchema,
radioUI,
} from 'platform/forms-system/src/js/web-component-patterns';
import PrefillAlertAndTitle from '../../../components/PrefillAlertAndTitle';
import { CHAPTER_3, contactOptions } from '../../../constants';
const yourContactInformationPage = {
uiSchema: {
'ui:description': PrefillAlertAndTitle,
phoneNumber: phoneUI(),
emailAddress: emailUI(),
contactPreference: radioUI({
title: CHAPTER_3.CONTACT_PREF.QUESTION_1,
description: '',
labels: contactOptions,
}),
},
schema: {
type: 'object',
required: ['phoneNumber', 'emailAddress', 'contactPreference'],
properties: {
phoneNumber: phoneSchema,
emailAddress: emailSchema,
contactPreference: radioSchema(Object.keys(contactOptions)),
},
},
};
export default yourContactInformationPage;