Files
4ca6d991-5f5f-477d-8b3e-844…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

50 lines
1.0 KiB
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontWeight?: number | string;
letterSpacing?: number;
fill?: string;
textAnchor?: 'start' | 'middle' | 'end';
dominantBaseline?: 'auto' | 'middle' | 'hanging';
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 48,
fontWeight = 'bold',
letterSpacing = 0,
fill = 'currentColor',
textAnchor = 'middle',
dominantBaseline = 'middle',
}) => {
return (
<svg
viewBox="0 0 800 200"
className={`w-full h-full ${className}`}
xmlns="http://www.w3.org/2000/svg"
>
<text
x="50%"
y="50%"
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
fill={fill}
textAnchor={textAnchor}
dominantBaseline={dominantBaseline}
style={{
fontFamily: 'inherit',
}}
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;