Skip to content

Commit f9bf403

Browse files
authored
Merge pull request #97 from ruucm/UI-component-fix
2 parents e716555 + 6ea6f46 commit f9bf403

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/ui/src/TextAnimation.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export function TextAnimation({
1010
width = null,
1111
yBefore = 20,
1212
isFramerCanvas = false,
13+
fontFamily = '"Lora", serif',
1314
}) {
1415
const letterContainerVariants = {
1516
before: { transition: { staggerChildren: 0.015 } },
@@ -63,7 +64,7 @@ export function TextAnimation({
6364
style={{
6465
position: 'relative',
6566
wordBreak: 'break-word',
66-
width: width,
67+
width: width === 0 ? 'fit-content' : width,
6768
}}
6869
>
6970
<motion.h1
@@ -78,6 +79,7 @@ export function TextAnimation({
7879
fontSize: fontSize,
7980
color: color,
8081
fontWeight: 500,
82+
fontFamily: fontFamily,
8183
}}
8284
>
8385
{content.split(' ').map((word: string, wordI: number) => (

0 commit comments

Comments
 (0)