Files
69825e19-c064-4dd2-9ebc-38f…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

37 lines
694 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
fontSize?: number;
fill?: string;
className?: string;
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
fontSize = 32,
fill = 'currentColor',
className = '',
}) => {
return (
<svg
viewBox={`0 0 ${text.length * fontSize * 0.6} ${fontSize * 1.2}`}
className={className}
xmlns="http://www.w3.org/2000/svg"
>
<text
x="50%"
y="50%"
dominantBaseline="middle"
textAnchor="middle"
fontSize={fontSize}
fill={fill}
fontWeight="bold"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;