Files
4b25fc2b-e3d4-445d-af6b-af3…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

42 lines
874 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontWeight?: 'normal' | 'bold' | 'lighter' | number;
fill?: string;
dominantBaseline?: 'auto' | 'middle' | 'hanging' | 'mathematical' | 'central';
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 24,
fontWeight = 'bold',
fill = 'currentColor',
dominantBaseline = 'middle',
}) => {
return (
<svg
viewBox="0 0 100 100"
className={`w-full h-full ${className}`}
xmlns="http://www.w3.org/2000/svg"
>
<text
x="50"
y="50"
textAnchor="middle"
dominantBaseline={dominantBaseline}
fontSize={fontSize}
fontWeight={fontWeight}
fill={fill}
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;