Merge version_1 into main #7

Merged
bender merged 1 commits from version_1 into main 2026-03-10 20:31:38 +00:00

View File

@@ -1,45 +1,52 @@
import React from 'react';
import { SVGProps } from 'react';
type DominantBaseline = 'auto' | 'before-edge' | 'hanging' | 'ideographic' | 'alphabetic' | 'central' | 'mathematical' | 'use-script' | 'no-change' | 'reset-size' | 'inherit';
interface SvgTextLogoProps extends SVGProps<SVGSVGElement> {
interface SvgTextLogoProps extends Omit<SVGProps<SVGSVGElement>, 'dominantBaseline'> {
text?: string;
fontSize?: number;
fontWeight?: number | string;
fill?: string;
fontFamily?: string;
dominantBaseline?: DominantBaseline;
letterSpacing?: number;
dominantBaseline?: 'auto' | 'inherit' | 'alphabetic' | 'hanging' | 'ideographic' | 'mathematical' | 'text-before-edge' | 'middle' | 'central' | 'text-after-edge' | 'use-script' | 'no-change' | 'reset-size';
}
export default function SvgTextLogo({
text = 'Logo',
fontSize = 32,
fontWeight = 'bold',
fill = 'currentColor',
fontFamily = 'system-ui, -apple-system, sans-serif',
dominantBaseline = 'central',
...props
}: SvgTextLogoProps) {
return (
<svg
width="200"
height="80"
viewBox="0 0 200 80"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<text
x="50%"
y="50%"
textAnchor="middle"
dominantBaseline={dominantBaseline}
fontSize={fontSize}
fontWeight={fontWeight}
fill={fill}
fontFamily={fontFamily}
const SvgTextLogo = React.forwardRef<SVGSVGElement, SvgTextLogoProps>(
(
{
text = 'Logo',
fontSize = 32,
fontWeight = 700,
letterSpacing = 0,
dominantBaseline = 'middle',
className = '',
...props
},
ref,
) => {
return (
<svg
ref={ref}
viewBox="0 0 200 50"
xmlns="http://www.w3.org/2000/svg"
className={className}
{...props}
>
{text}
</text>
</svg>
);
}
<text
x="50%"
y="50%"
fontSize={fontSize}
fontWeight={fontWeight}
letterSpacing={letterSpacing}
dominantBaseline={dominantBaseline as 'auto' | 'inherit' | 'alphabetic' | 'hanging' | 'ideographic' | 'mathematical' | 'text-before-edge' | 'middle' | 'central' | 'text-after-edge' | 'use-script' | 'no-change' | 'reset-size'}
textAnchor="middle"
fill="currentColor"
>
{text}
</text>
</svg>
);
},
);
SvgTextLogo.displayName = 'SvgTextLogo';
export default SvgTextLogo;