35 lines
629 B
TypeScript
35 lines
629 B
TypeScript
import React from 'react';
|
|
|
|
interface SvgTextLogoProps {
|
|
text: string;
|
|
fontSize?: number;
|
|
fill?: string;
|
|
className?: string;
|
|
}
|
|
|
|
export function SvgTextLogo({
|
|
text,
|
|
fontSize = 48,
|
|
fill = 'currentColor',
|
|
className,
|
|
}: SvgTextLogoProps) {
|
|
return (
|
|
<svg
|
|
viewBox={`0 0 ${text.length * fontSize * 0.6} ${fontSize * 1.5}`}
|
|
className={className}
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
>
|
|
<text
|
|
x="0"
|
|
y={fontSize}
|
|
fontSize={fontSize}
|
|
fill={fill}
|
|
fontWeight="bold"
|
|
dominantBaseline="middle"
|
|
>
|
|
{text}
|
|
</text>
|
|
</svg>
|
|
);
|
|
}
|