Skip to content

Commit

Permalink
updated wrapping required checkbox indicator (#3728)
Browse files Browse the repository at this point in the history
  • Loading branch information
chlebektomas authored Jan 14, 2025
2 parents c804ce7 + 43e853f commit b0329f6
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions storefront/components/Basic/Link/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export const Link: FC<LinkProps> = ({
const classNameTwClass = twMergeCustom(
linkPlaceholderTwClassSegments[0],
isButton ? 'no-underline hover:no-underline' : linkPlaceholderTwClassSegments[1],
className,
);

const props = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ export const useWatchdogFormMeta = (formProviderMethods: UseFormReturn<WatchdogF
i18nKey="GdprAgreementCheckbox"
components={{
lnk1: privacyPolicyArticleUrl ? (
<Link isExternal href={privacyPolicyArticleUrl} target="_blank" />
<Link
isExternal
className="inline"
href={privacyPolicyArticleUrl}
target="_blank"
/>
) : (
<span className={linkPlaceholderTwClass} />
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ export const useNewsletterFormMeta = (
i18nKey="PrivacyPolicyCheckbox"
components={{
lnk1: privacyPolicyArticleUrl ? (
<Link isExternal href={privacyPolicyArticleUrl} target="_blank" />
<Link
isExternal
className="inline"
href={privacyPolicyArticleUrl}
target="_blank"
/>
) : (
<span className={linkPlaceholderTwClass} />
),
Expand Down
2 changes: 1 addition & 1 deletion storefront/components/Pages/Contact/contactFormMeta.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const useContactFormMeta = (formProviderMethods: UseFormReturn<ContactFor
i18nKey="GdprAgreementCheckbox"
components={{
lnk1: privacyPolicyUrl ? (
<Link isExternal href={privacyPolicyUrl} target="_blank" />
<Link isExternal className="inline" href={privacyPolicyUrl} target="_blank" />
) : (
<span className={linkPlaceholderTwClass} />
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export const RegistrationAfterOrder: FC = () => {
render={(checkbox) => <FormLine>{checkbox}</FormLine>}
checkboxProps={{
label: formMeta.fields.privacyPolicy.label,
required: true,
}}
/>
</FormBlockWrapper>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export const RegistrationContent: FC = () => {
render={(checkbox) => <ChoiceFormLine>{checkbox}</ChoiceFormLine>}
checkboxProps={{
label: formMeta.fields.gdprAgreement.label,
required: true,
}}
/>
<CheckboxControlled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,12 @@ export const useRegistrationFormMeta = (
i18nKey="GdprAgreementCheckbox"
components={{
lnk1: privacyPolicyArticleUrl ? (
<Link isExternal href={privacyPolicyArticleUrl} target="_blank" />
<Link
isExternal
className="inline"
href={privacyPolicyArticleUrl}
target="_blank"
/>
) : (
<span className={linkPlaceholderTwClass} />
),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b0329f6

Please sign in to comment.