Files
84ed7676-0ff5-4e60-919d-1ad…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

37 lines
696 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text?: string;
className?: string;
fontSize?: number;
fontWeight?: string;
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text = 'Logo',
className = '',
fontSize = 32,
fontWeight = '700',
}) => {
return (
<svg
viewBox={`0 0 ${text.length * fontSize * 0.6} ${fontSize}`}
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<text
x="0"
y={fontSize * 0.75}
fontSize={fontSize}
fontWeight={fontWeight}
fill="currentColor"
dominantBaseline="auto"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;