Files
1ade59bf-5c9f-4671-bb01-0fe…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

46 lines
906 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text?: string;
className?: string;
fontSize?: number;
fontFamily?: string;
fill?: string;
stroke?: string;
strokeWidth?: number;
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text = 'Logo',
className = '',
fontSize = 32,
fontFamily = 'Arial, sans-serif',
fill = '#000000',
stroke = 'none',
strokeWidth = 0,
}) => {
return (
<svg
viewBox={`0 0 ${text.length * fontSize * 0.6} ${fontSize * 1.5}`}
className={className}
preserveAspectRatio="xMidYMid meet"
>
<text
x="50%"
y="50%"
fontSize={fontSize}
fontFamily={fontFamily}
fill={fill}
stroke={stroke}
strokeWidth={strokeWidth}
textAnchor="middle"
dominantBaseline="central"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;