Files
251049c5-84d1-4e4f-93ce-8e7…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

43 lines
1001 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontWeight?: 'normal' | 'bold' | 'lighter';
textAnchor?: 'start' | 'middle' | 'end';
dominantBaseline?: 'auto' | 'text-after-edge' | 'alphabetic' | 'ideographic' | 'middle' | 'central' | 'hanging' | 'mathematical' | 'inherit';
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 48,
fontWeight = 'bold',
textAnchor = 'middle',
dominantBaseline = 'middle',
}) => {
return (
<svg
viewBox={`0 0 300 120`}
className={className}
xmlns="http://www.w3.org/2000/svg"
role="img"
aria-label={`${text} logo`}
>
<text
x="50%"
y="50%"
fontSize={fontSize}
fontWeight={fontWeight}
textAnchor={textAnchor}
dominantBaseline={dominantBaseline}
fill="currentColor"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;