Files
9f4ce862-2eb9-47f0-be75-814…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

38 lines
695 B
TypeScript

import React, { SVGProps } from 'react';
interface SvgTextLogoProps extends SVGProps<SVGSVGElement> {
text?: string;
size?: number;
weight?: number;
color?: string;
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text = 'Logo',
size = 24,
weight = 700,
color = '#000000',
...props
}) => {
return (
<svg
viewBox={`0 0 ${text.length * size * 0.6} ${size * 1.2}`}
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<text
x="0"
y={size}
fontSize={size}
fontWeight={weight}
fill={color}
dominantBaseline="auto"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;