Files
e3a0b47f-824f-4a2c-8f2c-3b7…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

40 lines
797 B
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
fontSize?: number;
fontFamily?: string;
fontWeight?: string | number;
fill?: string;
}
export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
fontSize = 32,
fontFamily = 'system-ui, -apple-system, sans-serif',
fontWeight = 'bold',
fill = '#ffffff',
}) => {
return (
<svg
viewBox="0 0 200 60"
xmlns="http://www.w3.org/2000/svg"
preserveAspectRatio="xMidYMid meet"
>
<text
x="50%"
y="50%"
textAnchor="middle"
dominantBaseline="central"
fontSize={fontSize}
fontFamily={fontFamily}
fontWeight={fontWeight}
fill={fill}
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;