Files
4542cdae-c112-4e34-bf71-808…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

44 lines
961 B
TypeScript

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