Files
7578a83a-8ae2-499b-83d2-10d…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

36 lines
705 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontFamily?: string;
}
export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 24,
fontFamily = 'Arial, sans-serif'
}) => {
return (
<svg
viewBox={`0 0 ${text.length * fontSize * 0.6} ${fontSize * 1.5}`}
className={className}
preserveAspectRatio="xMidYMid meet"
>
<text
x="0"
y={fontSize}
fontSize={fontSize}
fontFamily={fontFamily}
fontWeight="bold"
fill="currentColor"
dominantBaseline="middle"
>
{text}
</text>
</svg>
);
};