40 lines
786 B
TypeScript
40 lines
786 B
TypeScript
import React from 'react';
|
|
|
|
export interface SvgTextLogoProps {
|
|
text: string;
|
|
className?: string;
|
|
textClassName?: string;
|
|
fill?: string;
|
|
}
|
|
|
|
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
|
|
text,
|
|
className = '',
|
|
textClassName = '',
|
|
fill = 'currentColor',
|
|
}) => {
|
|
return (
|
|
<svg
|
|
viewBox={`0 0 ${text.length * 60} 100`}
|
|
className={`${className}`}
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
preserveAspectRatio="xMidYMid meet"
|
|
>
|
|
<text
|
|
x="50%"
|
|
y="50%"
|
|
dominantBaseline="middle"
|
|
textAnchor="middle"
|
|
className={textClassName}
|
|
fill={fill}
|
|
fontSize="48"
|
|
fontWeight="bold"
|
|
letterSpacing="2"
|
|
>
|
|
{text}
|
|
</text>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default SvgTextLogo; |