51 lines
1.1 KiB
TypeScript
51 lines
1.1 KiB
TypeScript
import React from 'react';
|
|
|
|
interface SvgTextLogoProps {
|
|
text: string;
|
|
className?: string;
|
|
fontSize?: number;
|
|
fontWeight?: number | string;
|
|
letterSpacing?: number;
|
|
fill?: string;
|
|
textAnchor?: 'start' | 'middle' | 'end';
|
|
dominantBaseline?: 'auto' | 'middle' | 'hanging' | 'baseline' | 'central';
|
|
}
|
|
|
|
export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
|
|
text,
|
|
className = '',
|
|
fontSize = 48,
|
|
fontWeight = 700,
|
|
letterSpacing = 0,
|
|
fill = 'currentColor',
|
|
textAnchor = 'middle',
|
|
dominantBaseline = 'middle',
|
|
}) => {
|
|
return (
|
|
<svg
|
|
viewBox="0 0 1000 200"
|
|
className={`w-full h-auto ${className}`}
|
|
preserveAspectRatio="xMidYMid meet"
|
|
>
|
|
<text
|
|
x="500"
|
|
y="100"
|
|
fontSize={fontSize}
|
|
fontWeight={fontWeight}
|
|
letterSpacing={letterSpacing}
|
|
fill={fill}
|
|
textAnchor={textAnchor}
|
|
dominantBaseline={dominantBaseline}
|
|
style={{
|
|
fontFamily: 'inherit',
|
|
textRendering: 'geometricPrecision',
|
|
}}
|
|
>
|
|
{text}
|
|
</text>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default SvgTextLogo;
|