Merge version_1 into main

Merge version_1 into main
This commit was merged in pull request #1.
This commit is contained in:
2026-03-11 23:56:56 +00:00
2 changed files with 42 additions and 43 deletions

View File

@@ -77,6 +77,7 @@ export default function LandingPage() {
imageAlt="Dar Saray design studio"
useInvertedBackground={true}
mediaAnimation="slide-up"
metricsAnimation="slide-up"
/>
</div>

View File

@@ -1,51 +1,49 @@
"use client";
import { memo } from "react";
import useSvgTextLogo from "./useSvgTextLogo";
import { cls } from "@/lib/utils";
import React, { forwardRef } from 'react';
interface SvgTextLogoProps {
logoText: string;
adjustHeightFactor?: number;
verticalAlign?: "top" | "center";
text: string;
fontSize?: number;
fontFamily?: string;
fontWeight?: number | string;
fill?: string;
className?: string;
}
const SvgTextLogo = memo<SvgTextLogoProps>(function SvgTextLogo({
logoText,
adjustHeightFactor,
verticalAlign = "top",
className = "",
}) {
const { svgRef, textRef, viewBox, aspectRatio } = useSvgTextLogo(logoText, false, adjustHeightFactor);
return (
<svg
ref={svgRef}
viewBox={viewBox}
className={cls("w-full", className)}
style={{ aspectRatio: aspectRatio }}
preserveAspectRatio="none"
role="img"
aria-label={`${logoText} logo`}
>
<text
ref={textRef}
x="0"
y={verticalAlign === "center" ? "50%" : "0"}
className="font-bold fill-current"
style={{
fontSize: "20px",
letterSpacing: "-0.02em",
dominantBaseline: verticalAlign === "center" ? "middle" : "text-before-edge"
}}
const SvgTextLogo = forwardRef<SVGSVGElement, SvgTextLogoProps>(
(
{
text,
fontSize = 24,
fontFamily = 'Arial, sans-serif',
fontWeight = 'bold',
fill = 'currentColor',
className = '',
},
ref
) => {
return (
<svg
ref={ref}
viewBox={`0 0 ${text.length * fontSize} ${fontSize * 1.5}`}
className={className}
xmlns="http://www.w3.org/2000/svg"
>
{logoText}
</text>
</svg>
);
});
<text
x="0"
y={fontSize}
fontSize={fontSize}
fontFamily={fontFamily}
fontWeight={fontWeight}
fill={fill}
dominantBaseline="middle"
>
{text}
</text>
</svg>
);
}
);
SvgTextLogo.displayName = "SvgTextLogo";
SvgTextLogo.displayName = 'SvgTextLogo';
export default SvgTextLogo;
export default SvgTextLogo;