Files
da70971f-8f7e-44e0-807d-e1b…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

39 lines
763 B
TypeScript

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