Files
8f9db2d0-e553-4fa4-88b8-7e8…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

46 lines
1.1 KiB
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fill?: string;
fontFamily?: string;
letterSpacing?: number;
dominantBaseline?: 'auto' | 'middle' | 'hanging' | 'ideographic' | 'mathematical' | 'alphabetic' | 'text-before-edge' | 'central' | 'text-after-edge' | 'use-script' | 'no-change' | 'reset-size' | 'inherit';
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 24,
fill = 'currentColor',
fontFamily = 'Arial, sans-serif',
letterSpacing = 0,
dominantBaseline = 'middle',
}) => {
return (
<svg
className={className}
viewBox="0 0 300 100"
xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid meet"
>
<text
x="50%"
y="50%"
fontSize={fontSize}
fill={fill}
fontFamily={fontFamily}
letterSpacing={letterSpacing}
dominantBaseline={dominantBaseline}
textAnchor="middle"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;