Files
83f84043-8efd-4c85-8328-ca9…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

45 lines
988 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontWeight?: number | string;
letterSpacing?: number;
dominantBaseline?: 'auto' | 'middle' | 'hanging' | 'alphabetic' | 'ideographic' | 'mathematical' | 'central';
textAnchor?: 'start' | 'middle' | 'end';
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 48,
fontWeight = 'bold',
letterSpacing = 2,
dominantBaseline = 'middle',
textAnchor = 'middle',
}) => {
return (
<svg
viewBox="0 0 500 100"
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<text
x="50%"
y="50%"
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
dominantBaseline={dominantBaseline}
textAnchor={textAnchor}
fill="currentColor"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;