50 lines
1.0 KiB
TypeScript
50 lines
1.0 KiB
TypeScript
import React from 'react';
|
|
|
|
interface SvgTextLogoProps {
|
|
text: string;
|
|
className?: string;
|
|
fill?: string;
|
|
stroke?: string;
|
|
strokeWidth?: number;
|
|
}
|
|
|
|
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
|
|
text,
|
|
className = '',
|
|
fill = 'currentColor',
|
|
stroke = 'none',
|
|
strokeWidth = 0,
|
|
}) => {
|
|
return (
|
|
<svg
|
|
viewBox="0 0 500 100"
|
|
className={`w-full h-auto ${className}`}
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
preserveAspectRatio="xMidYMid meet"
|
|
>
|
|
<defs>
|
|
<style>{`
|
|
.svg-text-logo-text {
|
|
font-size: 48px;
|
|
font-weight: bold;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
}
|
|
`}</style>
|
|
</defs>
|
|
<text
|
|
x="250"
|
|
y="60"
|
|
textAnchor="middle"
|
|
dominantBaseline="middle"
|
|
fill={fill}
|
|
stroke={stroke}
|
|
strokeWidth={strokeWidth}
|
|
className="svg-text-logo-text"
|
|
>
|
|
{text}
|
|
</text>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default SvgTextLogo; |