Files
3d8b9b40-fa2a-4d04-8579-3ab…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

48 lines
1.1 KiB
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
fontSize?: number;
fontFamily?: string;
fontWeight?: number | string;
fill?: string;
className?: string;
textAnchor?: 'start' | 'middle' | 'end';
dominantBaseline?: 'auto' | 'text-top' | 'hanging' | 'middle' | 'central' | 'text-bottom' | 'ideographic' | 'mathematical' | 'inherit';
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
fontSize = 48,
fontFamily = 'Arial, sans-serif',
fontWeight = 'bold',
fill = 'currentColor',
className = '',
textAnchor = 'start',
dominantBaseline = 'auto',
}) => {
return (
<svg
viewBox="0 0 1000 200"
xmlns="http://www.w3.org/2000/svg"
className={className}
preserveAspectRatio="xMidYMid meet"
>
<text
x="50%"
y="50%"
fontSize={fontSize}
fontFamily={fontFamily}
fontWeight={fontWeight}
fill={fill}
textAnchor={textAnchor}
dominantBaseline={dominantBaseline}
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;