Files
35511c19-ed3d-4aed-a1c8-398…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

44 lines
979 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontWeight?: 'normal' | 'bold' | '700';
letterSpacing?: number;
dominantBaseline?: 'auto' | 'middle' | 'hanging' | 'mathematical';
textAnchor?: 'start' | 'middle' | 'end';
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 48,
fontWeight = 'bold',
letterSpacing = 2,
dominantBaseline = 'middle',
textAnchor = 'middle',
}) => {
return (
<svg
viewBox="0 0 800 200"
className={`w-full h-auto ${className}`}
preserveAspectRatio="xMidYMid meet"
>
<text
x="50%"
y="50%"
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
dominantBaseline={dominantBaseline}
textAnchor={textAnchor}
className="fill-current"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;