Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #871 from B77Mills/idxModalSupport
Browse files Browse the repository at this point in the history
Update validation & spreading of idnetity-x-inline-form prop util
  • Loading branch information
solocommand authored Feb 16, 2024
2 parents efa29a0 + 50794c8 commit 868e4ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default {
modifiers: {
type: Array,
default: () => ['large'],
validator: (v) => v.every((val) => ['large', 'footer'].includes(val)),
validator: (v) => v.every((val) => ['large', 'footer', 'modal'].includes(val)),
},
disabled: {
type: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = ({ out, input }) => {
const source = defaultValue(input.source, 'newsletterSignup');
const configName = defaultValue(input.configName, 'signupBanner');
const newsletterSignupType = defaultValue(input.type, 'default');
const validTypes = ['inlineContent', 'inlineSection', 'footer'];
const validTypes = ['inlineContent', 'inlineSection', 'footer', 'modal'];
const withImage = defaultValue(input.withImage, true);

if (!validTypes.includes(newsletterSignupType)) {
Expand All @@ -31,8 +31,8 @@ module.exports = ({ out, input }) => {
const imageSrcset = imageSrc ? `${imageSrc}&dpr=2 2x` : null;

return {
imageSrc: withImage && imageSrc,
imageSrcset: withImage && imageSrcset,
...((withImage && imageSrc) && { imageSrc }),
...((withImage && imageSrcset) && { imageSrcset }),
siteName: config.website('name'),
name,
description,
Expand All @@ -47,6 +47,7 @@ module.exports = ({ out, input }) => {
redirect: input.redirect,
loginEmailPlaceholder,
loginEmailLabel: input.loginEmailLabel,
modifiers: input.modifiers,
actionText: input.actionText,
consentPolicy: input.consentPolicy || get(application, 'organization.consentPolicy'),
emailConsentRequest: get(application, 'organization.emailConsentRequest'),
Expand Down

0 comments on commit 868e4ab

Please sign in to comment.