Files
525f507d-e3b2-42dd-9f41-9c6…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

35 lines
682 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
textClassName?: string;
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
textClassName = '',
}) => {
return (
<svg
viewBox={`0 0 ${text.length * 60} 100`}
className={`w-full h-auto ${className}`}
preserveAspectRatio="xMidYMid meet"
>
<text
x="50%"
y="50%"
textAnchor="middle"
dominantBaseline="central"
className={`text-4xl md:text-6xl font-bold ${textClassName}`}
fill="currentColor"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;