Files
f3c26ebb-72ca-445a-85ed-681…/src/components/shared/SvgTextLogo/SvgTextLogo.tsx

44 lines
1.1 KiB
TypeScript

import React from 'react';
interface SvgTextLogoProps {
text: string;
className?: string;
fontSize?: number;
fontWeight?: number | string;
letterSpacing?: number;
dominantBaseline?: 'auto' | 'text-before-edge' | 'middle' | 'central' | 'text-after-edge' | 'ideographic' | 'alphabetic' | 'hanging' | 'mathematical' | 'use-script' | 'no-change' | 'reset-size' | 'inherit';
textAnchor?: 'start' | 'middle' | 'end' | 'inherit';
}
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
text,
className = '',
fontSize = 24,
fontWeight = 700,
letterSpacing = 0,
dominantBaseline = 'middle',
textAnchor = 'middle',
}) => {
return (
<svg
viewBox="0 0 300 100"
className={`w-full h-auto ${className}`}
xmlns="http://www.w3.org/2000/svg"
>
<text
x="50%"
y="50%"
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
dominantBaseline={dominantBaseline}
textAnchor={textAnchor}
className="fill-current"
>
{text}
</text>
</svg>
);
};
export default SvgTextLogo;