Files
1fd04e29-84e2-4dc7-aedb-900…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

50 lines
1001 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
size?: number;
fill?: string;
fontFamily?: string;
fontSize?: number;
fontWeight?: number | string;
letterSpacing?: number;
className?: string;
}
export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
size = 200,
fill = 'currentColor',
fontFamily = 'system-ui, -apple-system, sans-serif',
fontSize = 24,
fontWeight = 700,
letterSpacing = 0,
className = '',
}) => {
return (
<svg
width={size}
height={size}
viewBox={`0 0 ${size} ${size}`}
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<text
x={size / 2}
y={size / 2}
textAnchor="middle"
dominantBaseline="middle"
fill={fill}
fontFamily={fontFamily}
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;