Files
11b94fa8-128a-42ca-b3c1-2d8…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

39 lines
750 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
fontSize?: number;
fill?: string;
className?: string;
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
fontSize = 24,
fill = 'currentColor',
className = '',
}) => {
return (
<svg
viewBox={`0 0 ${text.length * fontSize} ${fontSize * 1.5}`}
width={text.length * (fontSize / 1.5)}
height={fontSize}
className={className}
>
<text
x="0"
y={fontSize}
fontSize={fontSize}
fill={fill}
fontWeight="bold"
fontFamily="system-ui, -apple-system, sans-serif"
dominantBaseline="middle"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;