44 lines
901 B
TypeScript
44 lines
901 B
TypeScript
import { SVGProps } from 'react';
|
|
|
|
export interface SvgTextLogoProps extends SVGProps<SVGSVGElement> {
|
|
text?: string;
|
|
fontSize?: number;
|
|
fontWeight?: 'normal' | 'bold';
|
|
letterSpacing?: number;
|
|
fillColor?: string;
|
|
}
|
|
|
|
const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
|
|
text = 'Logo',
|
|
fontSize = 48,
|
|
fontWeight = 'bold',
|
|
letterSpacing = 0,
|
|
fillColor = '#000000',
|
|
...props
|
|
}) => {
|
|
return (
|
|
<svg
|
|
width={300}
|
|
height={100}
|
|
viewBox="0 0 300 100"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
{...props}
|
|
>
|
|
<text
|
|
x="50%"
|
|
y="50%"
|
|
textAnchor="middle"
|
|
dominantBaseline="central"
|
|
fontSize={fontSize}
|
|
fontWeight={fontWeight}
|
|
letterSpacing={letterSpacing}
|
|
fill={fillColor}
|
|
fontFamily="Arial, sans-serif"
|
|
>
|
|
{text}
|
|
</text>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default SvgTextLogo; |