Files
78d6a3d1-e055-4c44-a764-caf…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

36 lines
684 B
TypeScript

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