From eab2132536d1d037efc46a7caf983862ba1dbbd3 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 19:30:03 +0000 Subject: [PATCH 1/2] Update src/app/page.tsx --- src/app/page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 3ff307c..22bdabb 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -85,7 +85,7 @@ export default function LandingPage() { animationType="slide-up" textboxLayout="default" useInvertedBackground={false} - buttonAnimation="fade" + buttonAnimation="slide-up" /> From b1078c2246c22c08c10550f9bdadfa91c29e18a4 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 19:30:04 +0000 Subject: [PATCH 2/2] Update src/components/shared/SvgTextLogo/SvgTextLogo.tsx --- .../shared/SvgTextLogo/SvgTextLogo.tsx | 80 +++++++++++-------- 1 file changed, 46 insertions(+), 34 deletions(-) diff --git a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx index f214190..428675e 100644 --- a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx +++ b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx @@ -1,51 +1,63 @@ -"use client"; - -import { memo } from "react"; -import useSvgTextLogo from "./useSvgTextLogo"; -import { cls } from "@/lib/utils"; +import React, { useMemo } from 'react'; interface SvgTextLogoProps { - logoText: string; - adjustHeightFactor?: number; - verticalAlign?: "top" | "center"; + text: string; className?: string; + textClassName?: string; + fontSize?: number; + fontWeight?: 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold'; + dominantBaseline?: 'auto' | 'baseline' | 'hanging' | 'middle' | 'central'; } -const SvgTextLogo = memo(function SvgTextLogo({ - logoText, - adjustHeightFactor, - verticalAlign = "top", - className = "", -}) { - const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor); +const fontWeightMap: Record = { + light: 300, + normal: 400, + medium: 500, + semibold: 600, + bold: 700, + extrabold: 800, +}; + +export const SvgTextLogo: React.FC = ({ + text, + className = '', + textClassName = '', + fontSize = 48, + fontWeight = 'bold', + dominantBaseline = 'middle', +}) => { + const textRef = React.useRef(null); + const [viewBoxWidth, setViewBoxWidth] = React.useState(300); + + const numericFontWeight = fontWeightMap[fontWeight] || 700; + + React.useEffect(() => { + if (textRef.current) { + const bbox = textRef.current.getBBox(); + setViewBoxWidth(Math.max(bbox.width + 20, 300)); + } + }, [text]); return ( - {logoText} + {text} ); -}); - -SvgTextLogo.displayName = "SvgTextLogo"; +}; export default SvgTextLogo;