Files
1a931c8b-a69c-47cf-97e3-241…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

40 lines
979 B
TypeScript

import React from "react";
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontFamily?: string;
fill?: string;
x?: number;
y?: number;
dominantBaseline?: DominantBaseline;
}
type DominantBaseline = "auto" | "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "text-before-edge" | "middle" | "central" | "text-after-edge" | "use-script" | "no-change" | "reset-size";
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className,
fontSize = 32,
fontFamily = "Arial, sans-serif", fill = "currentColor", x = 0,
y = 0,
dominantBaseline = "middle"}) => {
return (
<svg viewBox="0 0 200 80" className={className} width="200" height="80">
<text
x={x}
y={y}
fontSize={fontSize}
fontFamily={fontFamily}
fill={fill}
dominantBaseline={dominantBaseline}
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;