Files
faaae792-34ec-4973-b084-3d9…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

50 lines
1.0 KiB
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontFamily?: string;
fontWeight?: number | string;
letterSpacing?: number;
textAnchor?: 'start' | 'middle' | 'end';
dominantBaseline?: 'auto' | 'middle' | 'hanging';
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 24,
fontFamily = 'Arial, sans-serif',
fontWeight = 'normal',
letterSpacing = 0,
textAnchor = 'middle',
dominantBaseline = 'middle',
}) => {
return (
<svg
width="100%"
height="100%"
viewBox="0 0 200 60"
className={className}
aria-label={text}
>
<text
x="50%"
y="50%"
fontSize={fontSize}
fontFamily={fontFamily}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
textAnchor={textAnchor}
dominantBaseline={dominantBaseline}
fill="currentColor"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;