35 lines
938 B
TypeScript
35 lines
938 B
TypeScript
import React, { ReactNode } from "react";
|
|
|
|
interface SvgTextLogoProps {
|
|
children?: ReactNode;
|
|
className?: string;
|
|
textClassName?: string;
|
|
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> = ({
|
|
children,
|
|
className = "", textClassName = "", dominantBaseline = "middle"
|
|
}) => {
|
|
return (
|
|
<svg
|
|
className={`${className}`}
|
|
viewBox="0 0 300 100"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
preserveAspectRatio="xMidYMid meet"
|
|
>
|
|
<text
|
|
x="50%"
|
|
y="50%"
|
|
dominantBaseline={dominantBaseline}
|
|
textAnchor="middle"
|
|
className={`text-3xl font-bold ${textClassName}`}
|
|
>
|
|
{children || "Logo"}
|
|
</text>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default SvgTextLogo;
|