diff --git a/src/app/page.tsx b/src/app/page.tsx index 338c7fc..ce97d4e 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -68,6 +68,7 @@ export default function LandingPage() { imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3An3bKtQCvkWEWug7gjEDCOtTTo/a-focused-developer-working-intently-at--1773214662679-8ecfd971.png" imageAlt="Developer working on animated project" mediaAnimation="blur-reveal" + metricsAnimation="blur-reveal" useInvertedBackground={false} /> diff --git a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx index f214190..5be8235 100644 --- a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx +++ b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx @@ -1,51 +1,74 @@ -"use client"; - -import { memo } from "react"; -import useSvgTextLogo from "./useSvgTextLogo"; -import { cls } from "@/lib/utils"; +import React, { CSSProperties } from 'react'; interface SvgTextLogoProps { - logoText: string; - adjustHeightFactor?: number; - verticalAlign?: "top" | "center"; + text: string; className?: string; + animate?: boolean; + animationDuration?: number; + fill?: string; + stroke?: string; + strokeWidth?: number; + fontSize?: number; + fontFamily?: string; + fontWeight?: number | string; + letterSpacing?: number; + textAnchor?: 'start' | 'middle' | 'end'; + dominantBaseline?: 'auto' | 'middle' | 'hanging'; } -const SvgTextLogo = memo(function SvgTextLogo({ - logoText, - adjustHeightFactor, - verticalAlign = "top", - className = "", -}) { - const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor); +const SvgTextLogo: React.FC = ({ + text, + className = '', + animate = false, + animationDuration = 3, + fill = 'currentColor', + stroke = 'none', + strokeWidth = 0, + fontSize = 48, + fontFamily = 'inherit', + fontWeight = 700, + letterSpacing = 0, + textAnchor = 'middle', + dominantBaseline = 'middle', +}) => { + const animationStyle: CSSProperties = animate + ? { + animation: `float ${animationDuration}s ease-in-out infinite`, + } + : {}; return ( - - + + - {logoText} - - + + {text} + + + ); -}); - -SvgTextLogo.displayName = "SvgTextLogo"; +}; export default SvgTextLogo;