Files
162b90a0-9b8f-4e32-9f20-4a3…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

36 lines
920 B
TypeScript

import React, { SVGProps } from 'react';
interface SvgTextLogoProps extends SVGProps<SVGSVGElement> {
text?: string;
fontSize?: number;
dominantBaseline?: 'auto' | 'baseline' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'central' | 'middle';
}
const SvgTextLogo = React.forwardRef<SVGSVGElement, SvgTextLogoProps>(
({ text = 'Logo', fontSize = 32, dominantBaseline = 'auto', ...props }, ref) => {
return (
<svg
ref={ref}
viewBox="0 0 200 100"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<text
x="50%"
y="50%"
textAnchor="middle"
dominantBaseline={dominantBaseline}
fontSize={fontSize}
fontWeight="bold"
fill="currentColor"
>
{text}
</text>
</svg>
);
}
);
SvgTextLogo.displayName = 'SvgTextLogo';
export default SvgTextLogo;