41 lines
782 B
TypeScript
41 lines
782 B
TypeScript
'use client';
|
|
|
|
import { FC } from 'react';
|
|
|
|
interface SvgTextLogoProps {
|
|
text: string;
|
|
fontSize?: number;
|
|
fontWeight?: number | string;
|
|
fillColor?: string;
|
|
className?: string;
|
|
}
|
|
|
|
const SvgTextLogo: FC<SvgTextLogoProps> = ({
|
|
text,
|
|
fontSize = 48,
|
|
fontWeight = 'bold',
|
|
fillColor = 'currentColor',
|
|
className = '',
|
|
}) => {
|
|
return (
|
|
<svg
|
|
viewBox={`0 0 ${text.length * (fontSize * 0.6)} ${fontSize * 1.5}`}
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
className={className}
|
|
>
|
|
<text
|
|
x="50%"
|
|
y="50%"
|
|
fontSize={fontSize}
|
|
fontWeight={fontWeight}
|
|
fill={fillColor}
|
|
textAnchor="middle"
|
|
dominantBaseline="middle"
|
|
>
|
|
{text}
|
|
</text>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default SvgTextLogo; |