Update src/components/shared/SvgTextLogo/SvgTextLogo.tsx

This commit is contained in:
2026-03-12 11:57:47 +00:00
parent 65df6d992c
commit 201cdf9b0e

View File

@@ -3,19 +3,35 @@ import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontWeight?: 'normal' | 'bold' | 'bolder';
letterSpacing?: number;
}
export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({ text, className = '' }) => {
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 48,
fontWeight = 'bold',
letterSpacing = 0,
}) => {
return (
<svg viewBox="0 0 500 100" className={`w-full h-auto ${className}`}>
<svg
viewBox={`0 0 ${text.length * fontSize * 0.6} ${fontSize * 1.2}`}
xmlns="http://www.w3.org/2000/svg"
className={`w-full h-auto ${className}`}
preserveAspectRatio="xMidYMid meet"
>
<text
x="50%"
y="50%"
dominantBaseline="middle"
textAnchor="middle"
fontSize="48"
fontWeight="bold"
dominantBaseline="central"
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
fill="currentColor"
fontFamily="system-ui, -apple-system, sans-serif"
>
{text}
</text>
@@ -23,4 +39,4 @@ export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({ text, className = '' }
);
};
export default SvgTextLogo;
export default SvgTextLogo;