Files
5cf2107b-c899-4975-8275-567…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

43 lines
1.1 KiB
TypeScript

import React, { SVGProps } from 'react';
export interface SvgTextLogoProps extends SVGProps<SVGSVGElement> {
text?: string;
className?: string;
}
const SvgTextLogo = React.forwardRef<SVGSVGElement, SvgTextLogoProps>(
({ text = 'WEBILD', className = '', ...props }, ref) => {
return (
<svg
ref={ref}
viewBox="0 0 500 100"
className={`w-full h-auto ${className}`}
{...props}
>
<defs>
<linearGradient id="textGradient" x1="0%" y1="0%" x2="100%" y2="0%">
<stop offset="0%" stopColor="#3b82f6" />
<stop offset="50%" stopColor="#8b5cf6" />
<stop offset="100%" stopColor="#ec4899" />
</linearGradient>
</defs>
<text
x="50%"
y="50%"
textAnchor="middle"
dominantBaseline="middle"
fontSize="72"
fontWeight="bold"
fill="url(#textGradient)"
fontFamily="system-ui, -apple-system, sans-serif"
>
{text}
</text>
</svg>
);
}
);
SvgTextLogo.displayName = 'SvgTextLogo';
export default SvgTextLogo;