-
Notifications
You must be signed in to change notification settings - Fork 1
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
[B2BP-691] - Update Form Component #336
Conversation
🦋 Changeset detectedLatest commit: eb3360d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #336 +/- ##
=======================================
Coverage 99.19% 99.19%
=======================================
Files 23 23
Lines 989 999 +10
Branches 40 40
=======================================
+ Hits 981 991 +10
Misses 8 8 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Simone Salsi <59611877+simosalsi@users.noreply.github.com>
Branch is not up to date with base branch@Meolocious it seems this Pull Request is not updated with base branch. |
…into PR-Form-Update
const makeFormProps = ({ | ||
title, | ||
subtitle, | ||
privacyLinkRecaptchaPolicy, | ||
privacyLinkTextRecaptchaPolicy, | ||
privacyLinkRecaptchaTerms, | ||
privacyLinkTextRecaptchaTerms, | ||
formCategories, | ||
theme, | ||
ctaButtons, | ||
...rest | ||
}: FormSection): FormProps => ({ | ||
title, | ||
subtitle, | ||
privacyLinkRecaptchaPolicy, | ||
privacyLinkTextRecaptchaPolicy, | ||
privacyLinkRecaptchaTerms, | ||
privacyLinkTextRecaptchaTerms, | ||
formCategories: formCategories.map(({ label, additionalLabel }) => ({ | ||
label, | ||
additionalLabel: additionalLabel ?? '', | ||
})), | ||
theme, | ||
ctaButtons: ctaButtons.map(({ ...ctaBtn }) => ({ | ||
...ctaBtn, | ||
})), |
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.
const makeFormProps = ({ | |
title, | |
subtitle, | |
privacyLinkRecaptchaPolicy, | |
privacyLinkTextRecaptchaPolicy, | |
privacyLinkRecaptchaTerms, | |
privacyLinkTextRecaptchaTerms, | |
formCategories, | |
theme, | |
ctaButtons, | |
...rest | |
}: FormSection): FormProps => ({ | |
title, | |
subtitle, | |
privacyLinkRecaptchaPolicy, | |
privacyLinkTextRecaptchaPolicy, | |
privacyLinkRecaptchaTerms, | |
privacyLinkTextRecaptchaTerms, | |
formCategories: formCategories.map(({ label, additionalLabel }) => ({ | |
label, | |
additionalLabel: additionalLabel ?? '', | |
})), | |
theme, | |
ctaButtons: ctaButtons.map(({ ...ctaBtn }) => ({ | |
...ctaBtn, | |
})), | |
const makeFormProps = ({ | |
formCategories, | |
...rest | |
}: FormSection): FormProps => ({ | |
formCategories: formCategories.map(({ label, additionalLabel }) => ({ | |
label, | |
additionalLabel: additionalLabel ?? '', | |
})), |
Removing unchanged parameters, condensing them into ...rest
Jira Pull Request LinkThis Pull Request refers to the following Jira issue B2BP-691 |
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 optionality of the email
field will be reconsidered later with the end user.
List of Changes
Screenshot
Before Fix
After Fix
Motivation and Context
This PR is made to align components to new Figma design
How Has This Been Tested?
Tested locally
Types of changes
Checklist: