Files
1c90663a-ab04-48e7-9e77-1c5…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

44 lines
903 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontWeight?: number;
letterSpacing?: number;
dominantBaseline?: 'auto' | 'baseline' | 'middle' | 'hanging' | 'mathematical';
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 48,
fontWeight = 700,
letterSpacing = 2,
dominantBaseline = 'middle',
}) => {
return (
<svg
className={className}
viewBox="0 0 400 100"
xmlns="http://www.w3.org/2000/svg"
aria-label={text}
>
<text
x="50%"
y="50%"
textAnchor="middle"
dominantBaseline={dominantBaseline}
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
className="fill-current"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;