Files
ca3b2e33-ac83-4d2c-a30a-590…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

42 lines
1019 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontWeight?: number | string;
letterSpacing?: number;
dominantBaseline?: 'auto' | 'inherit' | 'alphabetic' | 'hanging' | 'ideographic' | 'mathematical' | 'text-before-edge' | 'middle' | 'central' | 'text-after-edge' | 'use-script' | 'no-change' | 'reset-size';
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 48,
fontWeight = 700,
letterSpacing = 2,
dominantBaseline = 'middle',
}) => {
return (
<svg
viewBox="0 0 1000 200"
className={className}
preserveAspectRatio="xMidYMid meet"
>
<text
x="50%"
y="50%"
textAnchor="middle"
dominantBaseline="middle"
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
className="fill-foreground font-bold"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;