47 lines
847 B
TypeScript
47 lines
847 B
TypeScript
import React from 'react';
|
|
|
|
interface SvgTextLogoProps {
|
|
text: string;
|
|
width?: number;
|
|
height?: number;
|
|
fontSize?: number;
|
|
fontWeight?: number | string;
|
|
fill?: string;
|
|
className?: string;
|
|
}
|
|
|
|
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
|
|
text,
|
|
width = 200,
|
|
height = 60,
|
|
fontSize = 32,
|
|
fontWeight = 'bold',
|
|
fill = 'currentColor',
|
|
className = '',
|
|
}) => {
|
|
return (
|
|
<svg
|
|
width={width}
|
|
height={height}
|
|
viewBox={`0 0 ${width} ${height}`}
|
|
className={className}
|
|
aria-label={text}
|
|
>
|
|
<text
|
|
x="50%"
|
|
y="50%"
|
|
textAnchor="middle"
|
|
dominantBaseline="central"
|
|
fontSize={fontSize}
|
|
fontWeight={fontWeight}
|
|
fill={fill}
|
|
fontFamily="inherit"
|
|
>
|
|
{text}
|
|
</text>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default SvgTextLogo;
|