Files
7353b29b-d48b-4c94-bcf2-56a…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

32 lines
586 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={className}
preserveAspectRatio="none"
>
<text
x="50%"
y="50%"
textAnchor="middle"
dominantBaseline="middle"
className={textClassName}
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;