From 2f339212aceddb9f0b39852617d14a7db38b5ab0 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 17:04:30 +0000 Subject: [PATCH] Update src/components/shared/SvgTextLogo/SvgTextLogo.tsx --- .../shared/SvgTextLogo/SvgTextLogo.tsx | 76 ++++++++++--------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx index f214190..16c4fc3 100644 --- a/src/components/shared/SvgTextLogo/SvgTextLogo.tsx +++ b/src/components/shared/SvgTextLogo/SvgTextLogo.tsx @@ -1,51 +1,55 @@ -"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; + width?: number; + height?: number; + fontSize?: number; + fill?: string; + fontFamily?: string; + fontWeight?: string | number; + letterSpacing?: number; className?: string; } -const SvgTextLogo = memo(function SvgTextLogo({ - logoText, - adjustHeightFactor, - verticalAlign = "top", - className = "", -}) { - const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor); +const SvgTextLogo: React.FC = ({ + text = 'Logo', + width = 200, + height = 100, + fontSize = 32, + fill = '#000000', + fontFamily = 'Arial, sans-serif', + fontWeight = 'bold', + letterSpacing = 0, + className = '', +}) => { + const textWidth = text.length * fontSize * 0.6; + const xPosition = Math.max(0, (width - textWidth) / 2); + const yPosition = (height + fontSize) / 2; return ( - {logoText} + {text} ); -}); +}; -SvgTextLogo.displayName = "SvgTextLogo"; - -export default SvgTextLogo; +export default SvgTextLogo; \ No newline at end of file