Files
f83ae00a-a984-47cf-87cc-0ac…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

45 lines
926 B
TypeScript

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