Files
21244f19-e3ea-4329-9a4e-816…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

42 lines
854 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text?: string;
fontSize?: number;
fontFamily?: string;
fontWeight?: string | number;
fill?: string;
className?: string;
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text = 'Webild',
fontSize = 32,
fontFamily = 'Arial, sans-serif',
fontWeight = 'bold',
fill = 'currentColor',
className,
}) => {
return (
<svg
viewBox={`0 0 ${text.length * fontSize * 0.6} ${fontSize * 1.5}`}
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<text
x="50%"
y="50%"
textAnchor="middle"
dominantBaseline="central"
fontSize={fontSize}
fontFamily={fontFamily}
fontWeight={fontWeight}
fill={fill}
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;