diff --git a/src/app/page.tsx b/src/app/page.tsx index 6eb861c..579eecf 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -161,7 +161,7 @@ export default function LandingPage() { tag="Impact" tagIcon={TrendingUp} tagAnimation="slide-up" - textboxLayout="centered" + textboxLayout="default" useInvertedBackground={false} animationType="slide-up" metrics={[ diff --git a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx index f214190..e40d118 100644 --- a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx +++ b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx @@ -1,51 +1,59 @@ -"use client"; +import React, { SVGProps } from 'react'; -import { memo } from "react"; -import useSvgTextLogo from "./useSvgTextLogo"; -import { cls } from "@/lib/utils"; - -interface SvgTextLogoProps { - logoText: string; - adjustHeightFactor?: number; - verticalAlign?: "top" | "center"; - className?: string; +interface SvgTextLogoProps extends SVGProps { + text?: string; + fontSize?: number; + fontWeight?: string | number; + fill?: string; + fontFamily?: string; + letterSpacing?: number; } -const SvgTextLogo = memo(function SvgTextLogo({ - logoText, - adjustHeightFactor, - verticalAlign = "top", - className = "", -}) { - const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor); +const SvgTextLogo = React.forwardRef( + ( + { + text = 'Webild', + fontSize = 32, + fontWeight = 700, + fill = 'currentColor', + fontFamily = 'system-ui, -apple-system, sans-serif', + letterSpacing = 0, + className = '', + ...props + }, + ref + ) => { + const textWidth = text.length * (fontSize * 0.6); + const viewBoxWidth = textWidth + 40; + const viewBoxHeight = fontSize * 1.5; - return ( - - - {logoText} - - - ); -}); + + {text} + + + ); + } +); -SvgTextLogo.displayName = "SvgTextLogo"; +SvgTextLogo.displayName = 'SvgTextLogo'; -export default SvgTextLogo; +export default SvgTextLogo; \ No newline at end of file