+
{parts.map((part: string, index: number) => {
if (part === "{tos}") {
- return (
-
handleUrl(termsOfServiceUrl)}
- target="_blank"
- rel="noopener noreferrer"
- className="text-text-muted hover:underline font-semibold"
- >
- {termsText}
-
- );
+ return cloneElement(Handler, {
+ key: index,
+ onClick: onNavigate ? () => onNavigate(termsOfServiceUrl) : undefined,
+ href: onNavigate ? undefined : termsOfServiceUrl,
+ children: getTranslation(ui, "labels", "termsOfService"),
+ });
}
+
if (part === "{privacy}") {
- return (
-
handleUrl(privacyPolicyUrl)}
- target="_blank"
- rel="noopener noreferrer"
- className="text-text-muted hover:underline font-semibold"
- >
- {privacyText}
-
- );
+ return cloneElement(Handler, {
+ key: index,
+ onClick: onNavigate ? () => onNavigate(privacyPolicyUrl) : undefined,
+ href: onNavigate ? undefined : privacyPolicyUrl,
+ children: getTranslation(ui, "labels", "privacyPolicy"),
+ });
}
+
return
{part};
})}
diff --git a/packages/styles/src/base.css b/packages/styles/src/base.css
index e1554590..74268378 100644
--- a/packages/styles/src/base.css
+++ b/packages/styles/src/base.css
@@ -79,6 +79,10 @@
@apply pt-24 max-w-md mx-auto;
}
+ :where(.fui-screen .fui-screen__children) {
+ @apply space-y-2;
+ }
+
:where(.fui-card) {
@apply bg-background p-10 border border-border rounded-card space-y-6;
}
@@ -145,7 +149,7 @@
}
:where(.fui-divider) {
- @apply flex items-center gap-3;
+ @apply flex items-center gap-3 my-4;
}
:where(.fui-divider__line) {
@@ -153,7 +157,7 @@
}
:where(.fui-divider__text) {
- @apply text-text-muted text-xs my-2;
+ @apply text-text-muted text-xs;
}
:where(.fui-phone-input) {
@@ -188,6 +192,15 @@
@apply absolute left-8 top-1/2 -translate-y-1/2 text-sm pointer-events-none text-text;
}
+ :where(.fui-policies) {
+ @apply text-text-muted text-center text-xs;
+ }
+
+ :where(.fui-policies a, .fui-policies button) {
+ @apply hover:underline font-semibold;
+ }
+
+
.fui-provider__button[data-provider="google.com"][data-themed="true"] {
--google-primary: #131314;
--color-primary: var(--google-primary);