Files
b75bbe10-e333-486a-b04f-594…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

42 lines
994 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontWeight?: number;
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 = 32,
fontWeight = 700,
letterSpacing = 0,
dominantBaseline = 'central',
}) => {
return (
<svg
viewBox={`0 0 ${text.length * 20} 60`}
className={className}
xmlns="http://www.w3.org/2000/svg"
>
<text
x="10"
y="30"
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
dominantBaseline={dominantBaseline}
className="fill-current"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;