Files
ab5f5877-c806-4345-aedf-228…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

36 lines
633 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
textClassName?: string;
id?: string;
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
textClassName = '',
id,
}) => {
return (
<svg
className={className}
viewBox={`0 0 ${text.length * 60} 100`}
preserveAspectRatio="xMidYMid meet"
id={id}
>
<text
x="50%"
y="50%"
className={textClassName}
textAnchor="middle"
dominantBaseline="central"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;