Files
e4ba2677-e2cf-485c-85ce-b43…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

39 lines
734 B
TypeScript

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