-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removes borders around form sections #1136
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import React, { useEffect, useState, useRef, SetStateAction, Dispatch } from 'react'; | ||
import { FormProvider, useForm } from 'react-hook-form'; | ||
import { t } from '@lingui/macro'; | ||
import { chakra, useDisclosure } from '@chakra-ui/react'; | ||
import { Box, chakra, useDisclosure } from '@chakra-ui/react'; | ||
import StepButtons from 'components/StepsButtons'; | ||
import ContactForm from 'components/Contacts/ContactForm'; | ||
import useCertificateStepper from 'hooks/useCertificateStepper'; | ||
|
@@ -68,7 +68,7 @@ const ContactsForm: React.FC<ContactsFormProps> = ({ data, shouldResetForm, onRe | |
resetForm(updatedCertificateStep?.form, { | ||
keepValues: false | ||
}); | ||
console.log('[] prev updatedCertificateStep', updatedCertificateStep); | ||
// console.log('[] prev updatedCertificateStep', updatedCertificateStep); | ||
previousStepRef.current = false; | ||
previousStep(updatedCertificateStep); | ||
} | ||
|
@@ -148,21 +148,27 @@ const ContactsForm: React.FC<ContactsFormProps> = ({ data, shouldResetForm, onRe | |
title={t`Legal/ Compliance Contact (required)`} | ||
description={t`Compliance officer or legal contact for requests about the compliance requirements and legal status of your organization. A business phone number is required to complete physical verification for MainNet registration. Please provide a phone number where the Legal/ Compliance contact can be contacted.`} | ||
/> | ||
<ContactForm | ||
<Box pt={5}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
<ContactForm | ||
name="contacts.technical" | ||
title={t`Technical Contact (required)`} | ||
description={t`Primary contact for handling technical queries about the operation and status of your service participating in the TRISA network. Can be a group or admin email.`} | ||
/> | ||
<ContactForm | ||
/> | ||
</Box> | ||
<Box pt={5}> | ||
<ContactForm | ||
name="contacts.administrative" | ||
title={t`Administrative Contact (optional)`} | ||
description={t`Administrative or executive contact for your organization to field high-level requests or queries. (Strongly recommended)`} | ||
/> | ||
<ContactForm | ||
/> | ||
</Box> | ||
<Box pt={5}> | ||
<ContactForm | ||
name="contacts.billing" | ||
title={t`Billing Contact (optional)`} | ||
description={t`Billing contact for your organization to handle account and invoice requests or queries relating to the operation of the TRISA network.`} | ||
/> | ||
/> | ||
</Box> | ||
<StepButtons | ||
handlePreviousStep={handlePreviousStepClick} | ||
handleNextStep={handleNextStepClick} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import { chakra, useDisclosure } from '@chakra-ui/react'; | |
import CountryOfRegistration from 'components/CountryOfRegistration'; | ||
import FormLayout from 'layouts/FormLayout'; | ||
import NameIdentifiers from '../NameIdentifiers'; | ||
import NationalIdentification from '../NameIdentification'; | ||
import NationalIdentification from '../NationalIdentification'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The file name was changed to make it easier to locate the component. |
||
import Address from 'components/Addresses'; | ||
import { FormProvider, useForm } from 'react-hook-form'; | ||
import StepButtons from 'components/StepsButtons'; | ||
|
@@ -71,7 +71,7 @@ const LegalForm: React.FC<LegalFormProps> = ({ data, shouldResetForm, onResetFor | |
resetForm(updatedCertificateStep?.form, { | ||
keepValues: false | ||
}); | ||
console.log('[] prev updatedCertificateStep', updatedCertificateStep); | ||
// console.log('[] prev updatedCertificateStep', updatedCertificateStep); | ||
previousStepRef.current = false; | ||
previousStep(updatedCertificateStep); | ||
} | ||
|
@@ -109,7 +109,7 @@ const LegalForm: React.FC<LegalFormProps> = ({ data, shouldResetForm, onResetFor | |
state: currentState() | ||
} as any | ||
}; | ||
console.log('[] isDirty payload', payload); | ||
// console.log('[] isDirty payload', payload); | ||
|
||
updateCertificateStep(payload); | ||
previousStepRef.current = true; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
FormLayout
component has a styles set to display the border that we wanted to remove from around the form's smaller sections. TheFormLayout
component is used throughout the UI, so replacing it with theStack
component allows for the content to be grouped together. This change will also make it easier to apply specific styles to a smaller section within a form.