From 2bad195c618deebf43859638f8101fbb1d75ca4b Mon Sep 17 00:00:00 2001 From: Wukong Sun Date: Thu, 21 Nov 2024 19:58:09 +0800 Subject: [PATCH] fix: mf-6495 space between texts --- .../mask/dashboard/components/OnboardingWriter/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/mask/dashboard/components/OnboardingWriter/index.tsx b/packages/mask/dashboard/components/OnboardingWriter/index.tsx index 0cb1eb5d0d3f..ec01b77f4f41 100644 --- a/packages/mask/dashboard/components/OnboardingWriter/index.tsx +++ b/packages/mask/dashboard/components/OnboardingWriter/index.tsx @@ -80,12 +80,13 @@ export function OnboardingWriter({ words, ...props }: OnboardingWriterProps) { : undefined, ), } - if (take < text.length) newJsx.push(cloneElement(fragment, props, [text.slice(0, take)])) + // the trailing space gets trimmed by i18n marco + if (take <= text.length) newJsx.push(cloneElement(fragment, props, [text.slice(0, take)])) else newJsx.push( cloneElement(fragment, props, [ text, - {strongText.slice(0, take - text.length)}, + {strongText.slice(0, take - text.length)}, ]), ) }