Files
32cf2834-2adf-42fb-b0b1-201…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

39 lines
814 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
fontSize?: number;
fontWeight?: 'normal' | 'bold' | 'lighter';
letterSpacing?: number;
className?: string;
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
fontSize = 48,
fontWeight = 'bold',
letterSpacing = 0,
className = '',
}) => {
return (
<svg
viewBox={`0 0 ${text.length * fontSize * 0.6} ${fontSize * 1.5}`}
className={`w-full h-auto ${className}`}
xmlns="http://www.w3.org/2000/svg"
>
<text
x="0"
y={fontSize}
fontSize={fontSize}
fontWeight={fontWeight}
fill="currentColor"
letterSpacing={letterSpacing}
dominantBaseline="middle"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;