From 77d4d5aff96c77d9e3f2b3783eb7dcbcd0155485 Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 13 Mar 2026 02:30:30 +0000 Subject: [PATCH] Update src/components/shared/SvgTextLogo/SvgTextLogo.tsx --- .../shared/SvgTextLogo/SvgTextLogo.tsx | 88 +++++++++++-------- 1 file changed, 49 insertions(+), 39 deletions(-) diff --git a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx index f214190..9549781 100644 --- a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx +++ b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx @@ -1,51 +1,61 @@ -"use client"; - -import { memo } from "react"; -import useSvgTextLogo from "./useSvgTextLogo"; -import { cls } from "@/lib/utils"; +import React from 'react'; interface SvgTextLogoProps { - logoText: string; - adjustHeightFactor?: number; - verticalAlign?: "top" | "center"; + text: string; className?: string; + animationType?: 'none' | 'wave' | 'float'; } -const SvgTextLogo = memo(function SvgTextLogo({ - logoText, - adjustHeightFactor, - verticalAlign = "top", - className = "", -}) { - const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor); +export const SvgTextLogo: React.FC = ({ + text, + className = '', + animationType = 'none', +}) => { + const characters = text.split(''); + const characterWidth = 20; + const totalWidth = characters.length * characterWidth; + const fontSize = 32; return ( - - {logoText} - + {characters.map((char, index) => { + let yOffset = 0; + let animationDelay = 0; + + if (animationType === 'wave') { + yOffset = Math.sin((index / characters.length) * Math.PI) * 5; + animationDelay = index * 50; + } else if (animationType === 'float') { + animationDelay = index * 100; + } + + return ( + + {char} + + ); + })} ); -}); +}; -SvgTextLogo.displayName = "SvgTextLogo"; - -export default SvgTextLogo; +export default SvgTextLogo; \ No newline at end of file