45 lines
1.0 KiB
TypeScript
45 lines
1.0 KiB
TypeScript
import React from 'react';
|
|
|
|
interface SvgTextLogoProps {
|
|
text: string;
|
|
className?: string;
|
|
fontSize?: number;
|
|
fontWeight?: 'normal' | 'bold' | 'lighter';
|
|
letterSpacing?: string;
|
|
dominantBaseline?: 'auto' | 'middle' | 'hanging' | 'alphabetic' | 'text-before-edge' | 'text-after-edge' | 'central' | 'mathematical';
|
|
}
|
|
|
|
export const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
|
|
text,
|
|
className = '',
|
|
fontSize = 48,
|
|
fontWeight = 'bold',
|
|
letterSpacing = '0',
|
|
dominantBaseline = 'middle',
|
|
}) => {
|
|
return (
|
|
<svg
|
|
className={className}
|
|
viewBox="0 0 600 100"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
role="img"
|
|
aria-label={text}
|
|
>
|
|
<text
|
|
x="50%"
|
|
y="50%"
|
|
textAnchor="middle"
|
|
dominantBaseline={dominantBaseline}
|
|
fontSize={fontSize}
|
|
fontWeight={fontWeight}
|
|
letterSpacing={letterSpacing}
|
|
fill="currentColor"
|
|
className="select-none font-sans"
|
|
>
|
|
{text}
|
|
</text>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default SvgTextLogo; |