Files
9f781b4e-2467-43e9-a7d3-591…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

40 lines
783 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontWeight?: string | number;
letterSpacing?: number;
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 24,
fontWeight = 'bold',
letterSpacing = 0,
}) => {
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}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
fill="currentColor"
dominantBaseline="central"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;