diff --git a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx index f214190..e47c56c 100644 --- a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx +++ b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx @@ -1,51 +1,81 @@ -"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; + fontSize?: number; + fontWeight?: number | string; + letterSpacing?: number; + fillColor?: string; + strokeColor?: string; + strokeWidth?: number; + filterEffect?: 'blur' | 'glow' | 'shadow' | 'none'; } -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 = '', + fontSize = 48, + fontWeight = 700, + letterSpacing = 2, + fillColor = '#000000', + strokeColor = 'none', + strokeWidth = 0, + filterEffect = 'none', +}) => { + const textLength = text.length; + const charWidth = fontSize * 0.6; + const svgWidth = textLength * charWidth + 40; + const svgHeight = fontSize + 40; return ( + {filterEffect !== 'none' && ( + + {filterEffect === 'blur' && ( + + + + )} + {filterEffect === 'glow' && ( + + + + + + + )} + {filterEffect === 'shadow' && ( + + + + )} + + )} - {logoText} + {text} ); -}); +}; -SvgTextLogo.displayName = "SvgTextLogo"; - -export default SvgTextLogo; +export default SvgTextLogo; \ No newline at end of file