40 lines
911 B
TypeScript
40 lines
911 B
TypeScript
import React from 'react';
|
|
|
|
interface SvgTextLogoProps {
|
|
text: string;
|
|
className?: string;
|
|
fontSize?: number;
|
|
fontWeight?: number | string;
|
|
fill?: string;
|
|
dominantBaseline?: 'auto' | 'text-top' | 'hanging' | 'middle' | 'central' | 'text-bottom' | 'ideographic' | 'mathematical' | 'inherit';
|
|
}
|
|
|
|
export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
|
|
text,
|
|
className = '',
|
|
fontSize = 24,
|
|
fontWeight = 700,
|
|
fill = 'currentColor',
|
|
dominantBaseline = 'middle',
|
|
}) => {
|
|
return (
|
|
<svg
|
|
viewBox={`0 0 ${text.length * fontSize * 0.6} ${fontSize * 1.5}`}
|
|
className={className}
|
|
preserveAspectRatio="xMidYMid meet"
|
|
>
|
|
<text
|
|
x="0"
|
|
y={fontSize * 0.75}
|
|
fontSize={fontSize}
|
|
fontWeight={fontWeight}
|
|
fill={fill}
|
|
dominantBaseline="middle"
|
|
>
|
|
{text}
|
|
</text>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default SvgTextLogo; |