Files
573beaf0-1bb7-444c-8515-526…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

41 lines
848 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 = 'Logo',
fontSize = 24,
fontFamily = 'system-ui, -apple-system, sans-serif',
fontWeight = 'bold',
fill = '#000000',
className = '',
}) => {
return (
<svg
viewBox={`0 0 ${text.length * (fontSize * 0.6)} ${fontSize * 1.2}`}
className={className}
xmlns="http://www.w3.org/2000/svg"
>
<text
x="0"
y={fontSize}
fontSize={fontSize}
fontFamily={fontFamily}
fontWeight={fontWeight}
fill={fill}
dominantBaseline="central"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;