Files
36b834a0-e4a0-4f0c-abe5-234…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

38 lines
730 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontFamily?: string;
fill?: string;
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 24,
fontFamily = 'Arial, sans-serif',
fill = '#000000',
}) => {
return (
<svg
viewBox={`0 0 ${text.length * fontSize * 0.6} ${fontSize * 1.5}`}
className={className}
xmlns="http://www.w3.org/2000/svg"
>
<text
x="0"
y={fontSize}
fontSize={fontSize}
fontFamily={fontFamily}
fill={fill}
dominantBaseline="hanging"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;