Files
b996b573-deb3-405b-b1fc-9ee…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

36 lines
677 B
TypeScript

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