49 lines
1.2 KiB
TypeScript
49 lines
1.2 KiB
TypeScript
import React from 'react';
|
|
|
|
interface SvgTextLogoProps {
|
|
text: string;
|
|
className?: string;
|
|
fontSize?: number;
|
|
fontFamily?: string;
|
|
fontWeight?: string | number;
|
|
letterSpacing?: number;
|
|
textAnchor?: 'start' | 'middle' | 'end';
|
|
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 = 'inherit',
|
|
fontWeight = 700,
|
|
letterSpacing = 0,
|
|
textAnchor = 'middle',
|
|
dominantBaseline = 'middle',
|
|
}) => {
|
|
return (
|
|
<svg
|
|
viewBox="0 0 200 60"
|
|
className={className}
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
aria-label={text}
|
|
>
|
|
<text
|
|
x="100"
|
|
y="30"
|
|
fontSize={fontSize}
|
|
fontFamily={fontFamily}
|
|
fontWeight={fontWeight}
|
|
letterSpacing={letterSpacing}
|
|
textAnchor={textAnchor}
|
|
dominantBaseline={dominantBaseline}
|
|
fill="currentColor"
|
|
>
|
|
{text}
|
|
</text>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default SvgTextLogo;
|